Skip to content

Commit

Permalink
[eslint config] [*] [docs] update the peer dep install command to dyn…
Browse files Browse the repository at this point in the history
…amically look up the right version numbers when installing peer deps.

Fixes #956.

This command would be simpler if npm/npm#11213 is ever implemented.
  • Loading branch information
ljharb committed Jul 19, 2016
1 parent ca9c322 commit 623dc44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/eslint-config-airbnb-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-airbnb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 623dc44

Please sign in to comment.