-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
.eslintcache constantly generated #10161
Comments
Same... This just started happening to me today. |
Same for me as well. Couldn't find the answer anywhere else. |
It's part of v4, I think. There's a PR to have it moved into the node_modules folder, which I believe is consistent with some other caches. It's there to help speed up the linting during both development runs and production builds. It can mostly be ignored, but I don't think there's any way to disable it right now. |
same here |
put in .gitignore file |
This comment has been minimized.
This comment has been minimized.
adding it to the .gitignore file only disables its tracking. The file is annoying me and i want to get rid of this. |
This cache file dependency is not only annoying, but it's also a hurdle in trying to deploy the application as a non-root user in a container. Here's the related StackOverflow thread. |
same... |
same here |
same here... |
I think it should be be put into |
This file is generated with react-scripts 4.0.1. If you change the version to 4.0.0 you won't have this issue for now. This might get changed in a future release. |
Update: It has now started to cause compile errors as well:
Original:
https://eslint.org/docs/user-guide/configuring https://create-react-app.dev/docs/adding-custom-environment-variables/ https://eslint.org/docs/user-guide/command-line-interface#options You could also specify another cache location if you find a way to inject the command:
https://eslint.org/docs/2.0.0/user-guide/command-line-interface#caching |
It seems that cache was enabled on purpose here: #9911 |
Yes bt as @silverwind said it should be there in the |
I think the main issue is a bad default location coming from eslint, see eslint/eslint#13897. |
fixes facebook#10161 No need to generate eslint cache due to performance boost gained in eslint-webpack-plugin 2.4.1
same for me. |
Not only is it annoying, it also wastes time on debugging. My app kept showing an error for the line of code that was no longer there. I tried everything and only deleting .eslintcache solved the problem. |
Still generates |
A fix seems to be in progress #9977. Looks like the plan is to move |
As far as I understand that fix has nothing to do with an issue described by @dominikabieder
|
Having similar issue to @dominikabieder - Seems like when eslint fixes are applied by vscode, the .eslintcache isn't updated and eslint still complains of errors when run outside of vscode. |
Those sound like eslint/vscode bugs, you should report them there. |
Will do. In the meantime, in case anyone wanders by looking, if you're using nuxt and
|
Try running npm install after changing the version. That worked for me. |
I am having the build fail in Azure DevOps randomly with this cache file. I have added the gitignore so that it isn't in the repo. But still randomly an issue. So not sure that merely moving the location of the file is going to fix the random issue. Which feels like a race condition and back to react-scripts 0.9.2 issue. |
This works, but So, in this case, to ignore a file already tracked you also need to run |
We still have this issue after upgrading react-scripts from 4.0.1 to 4.0.2. We are downgrading to 4.0.0 until it's fixed. |
It is possible to disable the cache with a cli flag ( |
To avoid wasting any more time debugging issues caused by this file I went with the hand grenade approach in package.json:
|
Same! |
Same on my end. so I am forced now to uninstall it. |
This seems like an eslint issue, not a create-react-app issue. |
Yeah, same, I removed the eslint for now. |
@dominikabieder you may have better luck getting this resolved if you copypaste it to the eslint issues |
This really too bad; if I have a typo in my code and save it, then .eslintcache doesn't get cleared and the error continues to appear in the server. The only way to remove the error is to delete |
Maybe related to this bug or may not. Just wanna share my experience for those having permission denied/read-only .cache/.eslintcache issue. I also got this error just now. Looked around and found this thread, didn't really find any solution. I tried to remove node_modules folder entirely by running 'rm -rf' which also gave same permission error. Then I remembered that I didn't properly shut down my PC last night when I was booted into Windows. So I boot into Windows Fixed and no more issue for me. Just my 2cents. |
Has this really not been solved? |
I just managed to add it to .gitignore |
Yes, but as everyone says it's still being generated |
I have this trick I used before to block a auto generated file. make a folder/directory I know this is crazy idea. |
This is a HUGE time suck -- I keep having to re-edit/re-save my file (multiple times) and or remove that .eslintcache file (note that adding it to .gitignore does nothing to solve the problem -- the file still keeps getting generated). |
🚨 Here's what worked for meESLint offers the option to set the cache location.
Example to send that bizzatch to the shadow realm (node-modules). from a script in {
...
"lint:fix": "eslint --cache --fix './src/**/*.{js,jsx,ts,tsx,json}' --cache-location './node_modules/@eslint/.eslintcache/'",
...
} For 10x galaxy brain billionaire devsℹ️ The script above lints everything in ⚡ I use pnpm so if you use Gotta blast! 🚀 |
* fix configurations * fix generated .eslintcahce file in root folder facebook/create-react-app#10161 * Update code-style.yml
* staging workflow * fix tests (1st try) * fix tests (2nd try) * clean up the mess * generate new lock.files * fix select overflow * fix configurations * fix generated .eslintcahce file in root folder facebook/create-react-app#10161 * Update code-style.yml * also update the shared module * Fix broken stylongs and update shared-modules * ignore tsconfig.tsbuildinfo * fixx * fix test configuration * fix gh actions
Is there a way of disabling .eslintcache generation? I'm struggling to find the answer in the documentation.
The text was updated successfully, but these errors were encountered: