Skip to content

Commit

Permalink
Add support for ignoreRestSiblings in no-unused-vars (#1705)
Browse files Browse the repository at this point in the history
* updating eslint to 3.16.1

* add support for ignoreRestSiblings in eslint

http://eslint.org/docs/rules/no-unused-vars#ignorerestsiblings

* updating eslint to 3.16.1 in `react-scripts`

* updating eslint

* missing `^`

* missing ^

* pinning main eslint and updating readme

* Pin ESLint version
  • Loading branch information
chrisdrackett authored and gaearon committed Mar 5, 2017
1 parent 3fe8289 commit 19a4672
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"babel-eslint": "7.1.0",
"eslint": "3.8.1",
"eslint": "3.16.1",
"eslint-config-react-app": "0.5.1",
"eslint-plugin-flowtype": "2.21.0",
"eslint-plugin-import": "2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you want to use this ESLint configuration in a project not built with Create
First, install this package, ESLint and the necessary plugins.

```sh
npm install --save-dev eslint-config-react-app babel-eslint@7.0.0 eslint@3.8.1 eslint-plugin-flowtype@2.21.0 eslint-plugin-import@2.0.1 eslint-plugin-jsx-a11y@2.2.3 eslint-plugin-react@6.4.1
npm install --save-dev eslint-config-react-app babel-eslint@7.0.0 eslint@3.16.1 eslint-plugin-flowtype@2.21.0 eslint-plugin-import@2.0.1 eslint-plugin-jsx-a11y@2.2.3 eslint-plugin-react@6.4.1
```

Then create a file named `.eslintrc` with following contents in the root folder of your project:
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-config-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ module.exports = {
'no-unused-vars': ['warn', {
vars: 'local',
varsIgnorePattern: '^_',
args: 'none'
args: 'none',
ignoreRestSiblings: true,
}],
'no-use-before-define': ['warn', 'nofunc'],
'no-useless-computed-key': 'warn',
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"peerDependencies": {
"babel-eslint": "^7.0.0",
"eslint": "^3.8.1",
"eslint": "^3.16.1",
"eslint-plugin-flowtype": "^2.21.0",
"eslint-plugin-import": "^2.0.1",
"eslint-plugin-jsx-a11y": "^2.2.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"css-loader": "0.26.1",
"detect-port": "1.0.1",
"dotenv": "2.0.0",
"eslint": "3.8.1",
"eslint": "3.16.1",
"eslint-config-react-app": "^0.5.2",
"eslint-loader": "1.6.3",
"eslint-plugin-flowtype": "2.21.0",
Expand Down

0 comments on commit 19a4672

Please sign in to comment.