'eslint --init' installs wrong versions of depencies for AirBnB
See original GitHub issueTell us about your environment Windows 10
- ESLint Version: 3.7.1
- Node Version: 5.3.0
- npm Version: 3.3.12
What parser (default, Babel-ESLint, etc.) are you using? N/A Please show your full configuration: AirBnB style guide What did you do? Please include the actual source code causing the issue.
npm init
Use a popular style guide
Airbnb
JSON
What did you expect to happen? I expected the node modules to install correctly. What actually happened? Please include the actual, raw output from ESLint. Eslint failed to correctly install dependencies as seen at the bottom of this output:
C:\SWDev\job-frontend>eslint --init
? How would you like to configure ESLint? Use a popular style guide
? Which style guide do you want to follow? Airbnb
? What format do you want your config file to be in? JSON
Installing eslint-plugin-react, eslint-plugin-jsx-a11y, eslint-plugin-import, eslint-config-airbnb
npm WARN install Couldn't install optional dependency: Unsupported
job-frontend@0.0.0 C:\SWDev\job-frontend
βββ¬ eslint@3.7.1
β βββ doctrine@1.3.0
βββ¬ eslint-config-airbnb@12.0.0
β βββ eslint-config-airbnb-base@8.0.0
β βββ UNMET PEER DEPENDENCY eslint-plugin-import@^1.16.0
βββ¬ UNMET PEER DEPENDENCY eslint-plugin-import@2.0.0
β βββ contains-path@0.1.0
β βββ eslint-import-resolver-node@0.2.3
β βββ¬ eslint-module-utils@1.0.0
β β βββ pkg-dir@1.0.0
β βββ lodash.cond@4.5.2
β βββ pkg-up@1.0.0
βββ¬ eslint-plugin-jsx-a11y@2.2.3
β βββ damerau-levenshtein@1.0.3
βββ eslint-plugin-react@6.4.1
npm WARN EPEERINVALID eslint-config-airbnb@12.0.0 requires a peer of eslint-plugin-import@^1.16.0 but none was installed.
npm WARN EPEERINVALID eslint-config-airbnb-base@8.0.0 requires a peer of eslint-plugin-import@^1.16.0 but none was installed.
npm WARN EPACKAGEJSON job-frontend@0.0.0 No license field.
Workaround The AirBnB style guide for standard javascript is actually eslint-config-airbnb-base, the one used by the wizard is for react. So I swapped out that package and chose the versions of the decencies that would work (with either react or standard AirBnB).
Initialized package.json:
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^2.0.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
Updated package.json:
"eslint-config-airbnb-base": "^8.0.0",
"eslint-plugin-import": "^1.16.0",
"eslint-plugin-jsx-a11y": "^2.2.2",
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:16 (12 by maintainers)
Top GitHub Comments
This is so broken itβs not even funny.
This has been broken for soo long now, are there any other close match standards that just works? Eslint seemed nice but itβs split out in so many packages that this really is becoming a pain to setup.