mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-06-12 08:05:06 +08:00
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
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user