nrwl / nx

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

Nx lint is not using the full configuration as eslint do #22458

Open elvince opened 3 months ago

elvince commented 3 months ago

Current Behavior

If I run eslint apps/xx/src/. or nx lint xx I should have the same ouput which is not the case.

Eslint command is properly using the eslint import plugin to manage absolute path import defined in the tsconfig. While nx lint command is not

Expected Behavior

Same output whatever command is used.

GitHub Repo

No response

Steps to Reproduce

  1. Create a monorepo react
  2. Setup a project with absolute path setup
  3. add in project eslint setup :
    settings: {
    'import/resolver': {
      typescript: {
        extensions: ['.js', '.jsx', '.ts', '.tsx', '.svg', '.png'],
        project: ['./apps/*/tsconfig.json'],
      },
      node: {
        extensions: ['.js', '.jsx', '.ts', '.tsx', '.svg', '.png'],
        project: ['./apps/*/tsconfig.json'],
      },
    },
    },
  4. launch the 2 different command

Nx Report

Node   : 20.9.0
OS     : win32-x64
npm    : 10.1.0

nx                 : 18.0.8
@nx/js             : 18.0.8
@nx/linter         : 18.0.8
@nx/eslint         : 18.0.8
@nx/workspace      : 18.0.8
@nx/cypress        : 18.0.8
@nx/devkit         : 18.0.8
@nx/eslint-plugin  : 18.0.8
@nx/react          : 18.0.8
@nrwl/tao          : 18.0.8
@nx/vite           : 18.0.8
@nx/web            : 18.0.8
typescript         : 5.3.3

Failure Logs

No response

Package Manager Version

No response

Operating System

Additional Information

No response

leosvelperez commented 3 weeks ago

Thanks for reporting this!

Please provide a repo where the issue can be reproduced to help us troubleshoot the problem more quickly.

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because no reproduction was provided within 7 days. Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue. Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues. This issue will be closed in 21 days if a reproduction is not provided. If a reproduction has been provided, please reply to keep it active. Thanks for being a part of the Nx community! 🙏