nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.77k stars 2.37k forks source link

Project Crystal eslint plugin does not include extended eslint config files in lint target inputs #22477

Open AronHoxha opened 8 months ago

AronHoxha commented 8 months ago

Current Behavior

Currently eslint/plugin for inferred targets does not include eslint-schema.json['extends'] file paths into target inputs, rather it only includes the workspaceRoot eslintrc.json as a hardcoded value

Expected Behavior

All extended eslint config file paths are added to the lint target inputs "recursively". Example: project A eslint config (extends) -> B eslint config -> C eslint config, all three elsint configs are added to the target inputs

GitHub Repo

https://github.com/AronHoxha/nx-examples

Steps to Reproduce

  1. In an app extend a new eslintrc.json (in the repo example eslint.other.json was extended in the cart project)
  2. Run nx graph
  3. You should notice that the newly extended eslint config file is not included in the lint target inputs

Nx Report

Node   : 18.16.0
OS     : linux-x64
yarn   : 1.22.19

nx                 : 18.1.2
@nx/js             : 18.1.2
@nx/jest           : 18.1.2
@nx/linter         : 18.1.2
@nx/eslint         : 18.1.2
@nx/workspace      : 18.1.2
@nx/angular        : 18.1.2
@nx/cypress        : 18.1.2
@nx/devkit         : 18.1.2
@nx/esbuild        : 18.1.2
@nx/eslint-plugin  : 18.1.2
@nx/nest           : 18.1.2
@nx/node           : 18.1.2
@nx/playwright     : 18.1.2
@nx/plugin         : 18.1.2
@nrwl/tao          : 18.1.2
@nx/web            : 18.1.2
@nx/webpack        : 18.1.2
nx-cloud           : 18.0.0
typescript         : 4.6.4
---------------------------------------
Community plugins:
@currents/nx                     : 2.0.1
@fortawesome/angular-fontawesome : 0.10.2
@ngrx/component                  : 13.2.0
@ngrx/component-store            : 13.2.0
@ngrx/effects                    : 13.2.0
@ngrx/eslint-plugin              : 15.4.0
@ngrx/router-store               : 13.2.0
@ngrx/schematics                 : 13.2.0
@ngrx/store                      : 13.2.0
@ngrx/store-devtools             : 13.2.0
@testing-library/angular         : 11.0.4
ng-mocks                         : 14.12.1
ngrx-immer                       : 2.1.1

Failure Logs

Cart app nx graph (truncated)

"c{
  "cart": {
    "name": "cart",
    "type": "app",
    "data": {
      "root": "apps/cart",
      "targets": {
        "lint": {
          "cache": true,
          "options": {
            "cwd": "apps/cart",
            "command": "eslint ."
          },
          "inputs": [
            "default",
            "{workspaceRoot}/.eslintrc.json",
            "{workspaceRoot}/apps/cart/.eslintrc.json",
            "{workspaceRoot}/tools/eslint-rules/**/*",
            {
              "externalDependencies": [
                "eslint"
              ]
            }
          ],
          "executor": "nx:run-commands",
          "configurations": {}
        }
      },
      "name": "cart",
      "$schema": "../../node_modules/nx/schemas/project-schema.json",
      "sourceRoot": "apps/cart/src",
      "projectType": "application",
      "generators": {},
      "tags": [
        "type:app",
        "scope:cart"
      ]
    }
  }
}

Package Manager Version

No response

Operating System

Additional Information

No response

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it hasn't had any activity for 6 months. Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore. If at this point, this is still an issue, please respond with updated information. It will be closed in 21 days if no further activity occurs. Thanks for being a part of the Nx community! 🙏