mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 21:38:03 -05:00
[eslint config] [*] [docs] update the peer dep install command to dynamically look up the right version numbers when installing peer deps.
Fixes #956. This command would be simpler if https://github.com/npm/npm/issues/11213 is ever implemented.
This commit is contained in:
@@ -12,7 +12,7 @@ We export two ESLint configurations for your usage.
|
||||
|
||||
Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires `eslint` and `eslint-plugin-import`.
|
||||
|
||||
1. `npm install --save-dev eslint-config-airbnb-base eslint-plugin-import eslint`
|
||||
1. `PKG=eslint-config-airbnb-base npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install "$PKG"` (which produces and runs a command like `npm install --save-dev eslint-config-airbnb-base eslint@^3.0.1 eslint-plugin-import@^1.10.3` but with whatever the proper version numbers are)
|
||||
2. add `"extends": "airbnb-base"` to your .eslintrc
|
||||
|
||||
### eslint-config-airbnb-base/legacy
|
||||
|
||||
@@ -12,7 +12,7 @@ We export three ESLint configurations for your usage.
|
||||
|
||||
Our default export contains all of our ESLint rules, including ECMAScript 6+ and React. It requires `eslint`, `eslint-plugin-import`, `eslint-plugin-react`, and `eslint-plugin-jsx-a11y`.
|
||||
|
||||
1. `npm install --save-dev eslint-config-airbnb eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y eslint`
|
||||
1. `PKG=eslint-config-airbnb npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install "$PKG"` (which produces and runs a command like `npm install eslint-config-airbnb eslint@^2.9.0 eslint-plugin-jsx-a11y@^1.2.0 eslint-plugin-import@^1.7.0 eslint-plugin-react@^5.0.1` but with whatever the proper version numbers are)
|
||||
2. add `"extends": "airbnb"` to your .eslintrc
|
||||
|
||||
### eslint-config-airbnb/base
|
||||
|
||||
Reference in New Issue
Block a user