Closed
Description
Describe the bug
I created .env file in root directory with EXTEND_ESLINT=true
then created .eslint.json file with my config for eslint
but while running npm start this config doesn't work!
So I had to run npm run eject
in file '/config/webpack.config.js' on the line 38 I have found
const isExtendingEslintConfig = process.env.EXTEND_ESLINT === 'true';
but this variable never used.
So on line 339 I just added useEslintrc: isExtendingEslintConfig, and it begans work correctly!
{
options: {
cache: true,
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
resolvePluginsRelativeTo: __dirname,
useEslintrc: isExtendingEslintConfig,
},
loader: require.resolve('eslint-loader'),
},
],
Did you try recovering your dependencies?
(Write your answer here.)
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
(paste the output of the command here.)
Steps to reproduce
- npx create-react-app my-app --template typescript
- add .env file in root directory with
EXTEND_ESLINT=true
- add .eslint.json with some rules, for example "react/jsx-props-no-spreading": [0]
- Try to check if the rule is working. In my case it's not!
Expected behavior
Expect it will consider rules from .eslintrc.json
Actual behavior
Ignoring rules from .eslintrc.json
Reproducible demo
(Paste the link to an example project and exact instructions to reproduce the issue.)