-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EXTEND_ESLINT=true - "Failed to compile" #9154
Comments
try remove node_modules and re-install |
The cache is stored under First stop the server, then delete the cache, then start the server. You need to do this every time you make changes to the eslint configuration. |
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. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
Please keep this issue open. Just spent the last few hours trying to:
All with the goal of trying to provide more rules to my app in a transitional way. I have never wanted to eject CRA so badly. |
I completely agree. And I feel your pain. I went as far as creating a script that runs every time I run
|
I didn't like seeing "no-unused-vars" warnings in browser console, so I found about the
EXTEND_ESLINT=true
feature and tried to configure it. The feature does indeed seem to work, only not the way I expected.Now I'm getting the "Failed to compile" error straight away:
I have eslint configured with
.eslintrc.js
file. Here is its content:In the editor (VS Code) this configuration is working OK. All the rules are honored.
I also tried to create similar config using
eslintConfig
section inpackage.json
file, but it didn't seem to work either.UPDATE: It looks like that number of errors (per file) is what matters. If I fix few of the
prettier
issues (so that number of issues is less than 5), it no longer fails to compile, and just displays remaining issues as warnings. It is interesting though that changing from 'warn' to 'error' or to 0 does not seem to have any effect for 'prettier/prettier' rule. Also changing from 0 to 1 for 'no-unused-vars' has no effect... Maybe the configuration got cached somehow?...UPDATE 2: If I set
cache
option tofalse
innode_modules/react-scripts/config/webpack.config.js
, as per https://stackoverflow.com/a/61463282, I'm finally getting some sensible behaviour: changes in.eslintrc.js
file result in different errors dispayed in browser console (or "Failed to compile"). Still no hot reloading though: I need to restart the web server. Now the remaining question is: with the default settingcache: true
, where the cache is stored and how long does it last?The text was updated successfully, but these errors were encountered: