Add support for ignoreRestSiblings in no-unused-vars (#1705)

* 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
This commit is contained in:
Chris Drackett
2017-03-05 06:54:33 -08:00
committed by Dan Abramov
parent 3fe828929f
commit 19a46724fb
5 changed files with 6 additions and 5 deletions

View File

@@ -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",

View File

@@ -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:

View File

@@ -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',

View File

@@ -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",

View File

@@ -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",