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

eslint --init failed when answered with "Inspect your JavaScript file" #13156

Closed
yeonjuan opened this issue Apr 7, 2020 · 2 comments
Closed
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

Comments

@yeonjuan
Copy link
Member

yeonjuan commented Apr 7, 2020

Tell us about your environment

  • ESLint Version: v7.0.0-alpha.3
  • Node Version: v11.15.0
  • npm Version: v6.7.0

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.

$ eslint --init

? How would you like to use ESLint? To check syntax, find problems, and enforce code style
? What type of modules does your project use? None of these
? Which framework does your project use? Vue.js   
? Does your project use TypeScript? No
? Where does your code run? Browser
? How would you like to define a style for your project? Inspect your JavaScript file(s)
? Which file(s), path(s), or glob(s) should be examined? test.js
? What format do you want your config file to be in? JavaScript

What did you expect to happen?

configuring eslint successfully

What actually happened? Please include the actual, raw output from ESLint.

configure failed

Failed to load plugin 'vue' declared in 'BaseConfig': Cannot find module 'eslint-plugin-vue'
Require stack:
- /Users/yeonjuan/Desktop/open-source/new-eslint-committer/test/__placeholder__.js
Referenced from: BaseConfig

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.

? How would you like to define a style for your project? Inspect your JavaScript file(s)
? Which file(s), path(s), or glob(s) should be examined? test.js

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)

@yeonjuan yeonjuan added bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon cli Relates to ESLint's command-line interface labels Apr 7, 2020
@eslint-deprecated eslint-deprecated bot added the auto closed The bot closed this issue label May 9, 2020
@eslint-deprecated
Copy link

Unfortunately, it looks like there wasn't enough interest from the team
or community to implement this change. While we wish we'd be able to
accommodate everyone's requests, we do need to prioritize. We've found
that issues failing to reach accepted status after 21 days tend to
never be accepted, and as such, we close those issues.
This doesn't mean the idea isn't interesting or useful, just that it's
not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

@kaicataldo
Copy link
Member

@yeonjuan Sorry we missed this. Is this still an issue? If so, can you reopen it and assign it to yourself?

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Nov 6, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

2 participants