Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import/no-unused-modules breaks --no-eslintrc and eslint fails #2907

Open
kkmuffme opened this issue Oct 26, 2023 · 2 comments
Open

import/no-unused-modules breaks --no-eslintrc and eslint fails #2907

kkmuffme opened this issue Oct 26, 2023 · 2 comments

Comments

@kkmuffme
Copy link

kkmuffme commented Oct 26, 2023

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 eslint/eslint#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.

@pnodet
Copy link

pnodet commented Feb 14, 2024

Running into this issue as well

@ljharb
Copy link
Member

ljharb commented Feb 14, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants