Skip to content

Commit 1f824c8

Browse files
fsonfeiqitian
authored andcommitted
Update eslint-plugin-react and enable new rules (facebook#696)
* Update eslint-plugin-react and enable new rules New rules: * `react/no-danger-with-children` (jsx-eslint/eslint-plugin-react#710) * `react/no-find-dom-node` (jsx-eslint/eslint-plugin-react#678) * `react/style-prop-object` (jsx-eslint/eslint-plugin-react#715) * Remove react/no-find-dom-node for now
1 parent 97c4cf8 commit 1f824c8

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"eslint-plugin-flowtype": "2.18.1",
1717
"eslint-plugin-import": "1.12.0",
1818
"eslint-plugin-jsx-a11y": "2.2.2",
19-
"eslint-plugin-react": "5.2.2",
19+
"eslint-plugin-react": "6.3.0",
2020
"lerna": "2.0.0-beta.28"
2121
}
2222
}

packages/eslint-config-react-app/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,13 @@ module.exports = {
189189
}],
190190
'react/jsx-uses-react': 'warn',
191191
'react/jsx-uses-vars': 'warn',
192+
'react/no-danger-with-children': 'warn',
192193
'react/no-deprecated': 'warn',
193194
'react/no-direct-mutation-state': 'warn',
194195
'react/no-is-mounted': 'warn',
195196
'react/react-in-jsx-scope': 'warn',
196197
'react/require-render-return': 'warn',
198+
'react/style-prop-object': 'warn',
197199

198200
// https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules
199201
'jsx-a11y/aria-role': 'warn',

packages/eslint-config-react-app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
"eslint-plugin-flowtype": "2.18.1",
1717
"eslint-plugin-import": "1.12.0",
1818
"eslint-plugin-jsx-a11y": "2.2.2",
19-
"eslint-plugin-react": "5.2.2"
19+
"eslint-plugin-react": "6.3.0"
2020
}
2121
}

packages/react-scripts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"eslint-plugin-flowtype": "2.18.1",
4747
"eslint-plugin-import": "1.12.0",
4848
"eslint-plugin-jsx-a11y": "2.2.2",
49-
"eslint-plugin-react": "5.2.2",
49+
"eslint-plugin-react": "6.3.0",
5050
"extract-text-webpack-plugin": "1.0.1",
5151
"file-loader": "0.9.0",
5252
"filesize": "3.3.0",

0 commit comments

Comments
 (0)