Skip to content

Commit

Permalink
Bump eslint-plugin-react version and update webpack config (#6132)
Browse files Browse the repository at this point in the history
* Bump eslint-plugin-react version

* Move eslint-plugin-react settings into eslint-config-react-app

* Add react/no-typos rule
  • Loading branch information
ianschmitz authored Jan 6, 2019
1 parent 3e1dc99 commit 005ee5b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions packages/eslint-config-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ module.exports = {
},
},

settings: {
react: {
version: 'detect',
},
},

rules: {
// http://eslint.org/docs/rules/
'array-callback-return': 'warn',
Expand Down Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
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 @@ -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",
Expand Down

0 comments on commit 005ee5b

Please sign in to comment.