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@4.1.1 --init installs eslint@3.19.0 #8870
Comments
I think this is intended and was introduced in #8713. |
I am seeing a similar issue. When I install ESLint, I am always getting v3.19.0 of the CLI:
|
Okay I figured out that this was happening because one of my dependencies requires eslint 3. It's kind of unexpected that my dependency's required version of eslint would override the version required by the project itself, but perhaps I don't understand the complexities here. |
@maxlapides A number of breaking changes were introduced on the plugin authoring side of things in ESLint v4. Installing ESLint v4 with a plugin that has not been updated yet could result in a broken installation, so the behavior you're seeing is intentional to ensure that everything works together. |
This still seems like a bug to me. It might be doing the right thing to make stuff work, but I don't think we should be installing a different version of ESLint during |
Added back labels while we continue this discussion. |
OK, in that case, how about we add a question to confirm to install a different version of ESLint? Preconditions: when package.json has a ESLint version that the chosen config does not support. ~/test$ node_modules/.bin/eslint --init
? How would you like to configure ESLint? Use a popular style guide
? Which style guide do you want to follow? Airbnb
? Do you use React? No
+ ? The style guide Airbnb requires eslint@^3.19. Do you install it? Yes
? What format do you want your config file to be in? JavaScript
Checking peerDependencies of eslint-config-airbnb-base
Installing eslint-config-airbnb-base@latest, eslint@^3.19.0, eslint-plugin-import@^2.2.0
# ...
Successfully created .eslintrc.js file in ~/test |
Has anyone tried to upgrade the eslint after the whole config finishes? It would be like this: |
@mysticatea I think we need to be more explicit:
|
Originally reported on Stack Overflow.
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using? n/a
Please show your full configuration: n/a
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
eslint@4.1.1
is still installed.What actually happened? Please include the actual, raw output from ESLint.
eslint@3.19.0
is installed.The text was updated successfully, but these errors were encountered: