diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index ca232b879ec..f83ed06a104 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -46,6 +46,12 @@ module.exports = { }, }, + settings: { + react: { + version: 'detect', + }, + }, + rules: { // http://eslint.org/docs/rules/ 'array-callback-return': 'warn', @@ -205,6 +211,7 @@ module.exports = { // 'react/no-deprecated': 'warn', 'react/no-direct-mutation-state': 'warn', 'react/no-is-mounted': 'warn', + 'react/no-typos': 'error', 'react/react-in-jsx-scope': 'error', 'react/require-render-return': 'error', 'react/style-prop-object': 'warn', diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 3696597fb44..7699d2cb040 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -314,7 +314,6 @@ module.exports = function(webpackEnv) { // @remove-on-eject-begin baseConfig: { extends: [require.resolve('eslint-config-react-app')], - settings: { react: { version: '999.999.999' } }, }, ignore: false, useEslintrc: false, diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 21471be46d4..0a94c39bd2d 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -44,7 +44,7 @@ "eslint-plugin-flowtype": "2.50.1", "eslint-plugin-import": "2.14.0", "eslint-plugin-jsx-a11y": "6.1.2", - "eslint-plugin-react": "7.11.1", + "eslint-plugin-react": "7.12.3", "file-loader": "2.0.0", "fork-ts-checker-webpack-plugin-alt": "0.4.14", "fs-extra": "7.0.1",