Skip to content

Commit 005ee5b

Browse files
authored
Bump eslint-plugin-react version and update webpack config (#6132)
* Bump eslint-plugin-react version * Move eslint-plugin-react settings into eslint-config-react-app * Add react/no-typos rule
1 parent 3e1dc99 commit 005ee5b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

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

+7
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ module.exports = {
4646
},
4747
},
4848

49+
settings: {
50+
react: {
51+
version: 'detect',
52+
},
53+
},
54+
4955
rules: {
5056
// http://eslint.org/docs/rules/
5157
'array-callback-return': 'warn',
@@ -205,6 +211,7 @@ module.exports = {
205211
// 'react/no-deprecated': 'warn',
206212
'react/no-direct-mutation-state': 'warn',
207213
'react/no-is-mounted': 'warn',
214+
'react/no-typos': 'error',
208215
'react/react-in-jsx-scope': 'error',
209216
'react/require-render-return': 'error',
210217
'react/style-prop-object': 'warn',

packages/react-scripts/config/webpack.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ module.exports = function(webpackEnv) {
314314
// @remove-on-eject-begin
315315
baseConfig: {
316316
extends: [require.resolve('eslint-config-react-app')],
317-
settings: { react: { version: '999.999.999' } },
318317
},
319318
ignore: false,
320319
useEslintrc: false,

packages/react-scripts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"eslint-plugin-flowtype": "2.50.1",
4545
"eslint-plugin-import": "2.14.0",
4646
"eslint-plugin-jsx-a11y": "6.1.2",
47-
"eslint-plugin-react": "7.11.1",
47+
"eslint-plugin-react": "7.12.3",
4848
"file-loader": "2.0.0",
4949
"fork-ts-checker-webpack-plugin-alt": "0.4.14",
5050
"fs-extra": "7.0.1",

0 commit comments

Comments
 (0)