react-scripts build ignores ESLint overrides
See original GitHub issueBringing back #8266 as something that I’m experiencing now.
Describe the bug
I made a lint rule that applies everywhere but want to exclude it for a directory. ESLint supports the overrides
option to achieve this but react-scripts build
ignores that and applies the rule anyway with EXTEND_ESLINT=true
option
Did you try recovering your dependencies?
irrelevant
Which terms did you search for in User Guide?
extend eslint overrides lint
Environment
Environment Info:
System:
OS: macOS 10.15.3
CPU: (4) x64 Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
Binaries:
Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm
Browsers:
Chrome: 80.0.3987.149
Firefox: 74.0
Safari: 13.0.5
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
- Make a CRA app
- add
EXTEND_ESLINT=true
to your invocation ofreact-scripts
- Make an ESLint file with a rule, and an override for that rule in with the
overrides
property - Make a file that breaks the rule but should be overridden
- run
react-scripts dev
orreact-scripts build
and see that CRA complains anyway
Expected behavior
It respects the rule
Actual behavior
It doesn’t
Issue Analytics
- State:
- Created 4 years ago
- Reactions:32
- Comments:22
Top Results From Across the Web
Disable ESLint that create-react-app provides - Stack Overflow
As of react-scripts v4.0.2, you can now opt out of ESLint with an environment variable. You can do this by adding it to...
Read more >How to add a custom ESLint configuration to a Create React ...
Create a .eslintignore file to ignore certain files/folders from linting. You can ignore the node_modules, distribution folders, cache folders ...
Read more >Ignoring Code - ESLint - Pluggable JavaScript Linter
You cannot write ignorePatterns property under overrides property. Patterns defined in .eslintignore take precedence over the ignorePatterns property of ...
Read more >eslint-plugin-disable - npm
To disable all plugins except specified ones use "disableAllExcept" flag in config settings (.eslintrc). The following config will disable all ...
Read more >[Solved]-Disable ESLint that create-react-app provides-Reactjs
note that override > rules section: add rules with "off" flag to disable them. ... You can disable eslint (and override other configurations)...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
It’s been half a year. Hope this will be prioritized soon.