diff --git a/packages/eslint-config-react-app/base.js b/packages/eslint-config-react-app/base.js index eef8973af55..1e94b5a16c5 100644 --- a/packages/eslint-config-react-app/base.js +++ b/packages/eslint-config-react-app/base.js @@ -43,5 +43,6 @@ module.exports = { rules: { 'react/jsx-uses-react': 'warn', 'react/jsx-uses-vars': 'warn', + 'react/react-in-jsx-scope': 'error', }, }; diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index e1ef9c6ed44..06e9fb6287d 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -253,7 +253,6 @@ module.exports = { '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 66af9f2ba13..bb506bbf446 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -361,6 +361,7 @@ module.exports = function (webpackEnv) { { options: { cache: true, + cwd: paths.appPath, formatter: require.resolve('react-dev-utils/eslintFormatter'), eslintPath: require.resolve('eslint'), resolvePluginsRelativeTo: __dirname,