eslint-plugin-import icon indicating copy to clipboard operation
eslint-plugin-import copied to clipboard

import/no-unused-modules breaks `--no-eslintrc` and eslint fails

Open kkmuffme opened this issue 2 years ago • 3 comments

When using import/no-unused-modules with unusedExports: true, it will overwrite CLI --no-eslintrc and start looking for eslint config files - and if it finds none (because they are in a different path and provided with --config) eslint will fail. (originally though it's an eslint bug, see https://github.com/eslint/eslint/issues/17682)

ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:

Additionally (not tested) this might also mean that in this case eslint will start to use eslintrc files or data from package.json it shouldn't use, since the flag is set.

kkmuffme avatar Oct 26 '23 08:10 kkmuffme

Running into this issue as well

pnodet avatar Feb 14 '24 14:02 pnodet

The problem makes sense to me; unfortunately I'm not aware of any way eslint lets us know that those flags were used.

ljharb avatar Feb 14 '24 16:02 ljharb