From d5c0fe287a6bc24c60ee52ca768bdf3a10b937e1 Mon Sep 17 00:00:00 2001 From: Brody McKee Date: Wed, 30 Sep 2020 20:18:23 +0300 Subject: [PATCH] fix: resolve ESLint config from appPath (#9683) --- packages/eslint-config-react-app/base.js | 1 + packages/eslint-config-react-app/index.js | 1 - packages/react-scripts/config/webpack.config.js | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) 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,