➜ beslint git:(master) ✗ eslint -v
v3.15.0
➜ beslint git:(master) ✗ npm install -g eslint-config-airbnb eslint-plugin-jsx-a11y eslint-plugin-import eslint-plugin-react
/Users/next/.nvm/versions/node/v7.5.0/lib
├── UNMET PEER DEPENDENCY eslint@^3.15.0
├─┬ [email protected]
│ └── UNMET PEER DEPENDENCY eslint@^3.15.0
├── [email protected]
├── [email protected]
└── [email protected]
npm WARN [email protected] requires a peer of eslint@^3.15.0 but none was installed.
npm WARN [email protected] requires a peer of eslint@^3.15.0 but none was installed.
npm WARN [email protected] requires a peer of [email protected] - 3.x but none was installed.
npm WARN [email protected] requires a peer of eslint@^2.10.2 || 3.x but none was installed.
npm WARN [email protected] requires a peer of eslint@^2.0.0 || ^3.0.0 but none was installed.
➜ beslint git:(master) ✗
node 7.5.0
, and installed eslint globally.eslint-config-airbnb
globally.UNMET PEER DEPENDENCY
You can install eslint-config-airbnb-bundle
. This is an unaltered Airbnb style guide config bundled with ESLint in a single package to solve some inconvenience with the installation (like unmet peer dependency warnings). You can install it globally as well:
npm i -g eslint-config-airbnb-bundle
Airbnb only: https://www.npmjs.com/package/eslint-config-airbnb-bundle
Airbnb + Standard: https://www.npmjs.com/package/eslint-config-airbnb-standard
I faced similar issue but found a solution to this issue. I thought its worth sharing.
To install the correct versions of each package related eslint config , You can run following command :
npm info "eslint-config-airbnb@latest" peerDependencies
You can get exact peer dependency which are listed by running above command:
e.g about outputs ( as of answer's date ) will produce following :
{ eslint: '^3.19.0 || ^4.3.0',
'eslint-plugin-jsx-a11y': '^5.1.1',
'eslint-plugin-import': '^2.7.0',
'eslint-plugin-react': '^7.1.0'
}
From above output you can exact idea about what dependencies to install for current ( latest build) .
If you want to install all dependencies in one go ( for Linux/OSX users only) Use below command :
(
export PKG=eslint-config-airbnb;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
More details here.
From https://www.npmjs.com/package/eslint-config-airbnb
npx install-peerdeps --dev eslint-config-airbnb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With