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
Bug: import/no-unused-modules
ESLint couldn't find a non-standard name configuration file
#16787
Comments
Hi @regseb, thanks for the issue!
The |
Ah, thanks for clarifying. |
@mdjermanovic does that mean if we passed the context to the FileEnumerator instance, it would Just Work with the legacy config system? |
It might work, but I don't think that rules have access to all the data that ESLint passes to FileEnumerator. eslint/lib/cli-engine/cli-engine.js Lines 606 to 628 in d8c8ede
|
ah, and that's not something eslint exposes to rules? |
No, and |
I'll try to find time to do that. Unfortunately, that won't address issues with existing users, and I'm highly disinclined to make a breaking change. |
Environment
Node version: v18.12.1
npm version: 9.2.0
Local ESLint version: 8.32.0
Global ESLint version: N/A
Operating System: Ubuntu 22.04.1 LTS
What parser are you using?
Default (Espree)
What did you do?
package.json:
my_eslint.json:
index.js:
Run this command:
npx eslint -c my_eslint.json --debug index.js
If I rename the configuration file to
.eslintrc.json
, there is no more problem. The error occurs when using a non-standard ESLint configuration file name (different from.eslintrc.*
).What did you expect to happen?
No error reported.
What actually happened?
Participation
Additional comments
import/no-unused-modules
is the only rule with this problem.The text was updated successfully, but these errors were encountered: