eslint --init failed when answered with "Inspect your JavaScript file" #13156
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
auto closed
The bot closed this issue
bug
ESLint is working incorrectly
cli
Relates to ESLint's command-line interface
triage
An ESLint team member will look at this issue soon
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
What did you expect to happen?
configuring eslint successfully
What actually happened? Please include the actual, raw output from ESLint.
configure failed
Are you willing to submit a pull request to fix this bug?
Yes
I found this bug in PR #12738
When we answered as below (Inspect your JavaScript file(s) ),
It seems ESlint initializer tries to lint the target file ( test.js ) to create a proper config.
But at that time, If some plugins(eg. react, vue, typescript-eslint) needed are not installed, the initializer failed.
It's because the function
configureRules()
is called before modules installed (askInstallModules
)configureRules
eslint/lib/init/config-initializer.js
Line 154 in c41de38
askInstallModules
eslint/lib/init/config-initializer.js
Line 617 in c41de38
The text was updated successfully, but these errors were encountered: