.eslintcache constantly generated
Is there a way of disabling .eslintcache generation? I'm struggling to find the answer in the documentation.
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
Same for me as well. Couldn't find the answer anywhere else.
put in .gitignore file
Same for me as well. Couldn't find the answer anywhere else.
put in .gitignore file
adding it to the .gitignore file only disables its tracking. The file is annoying me and i want to get rid of this. Its still keep generating.
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
I think it should be be put into node_modules/.cache/.eslintcache so it's out of sight like other caches (e.g. babel's).
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:

EBUSY: resource busy or locked, open 'C:\Users\Oscar\source\repos\<>\ClientApp\.eslintcache'
Original:
eslint --cache false should work but I don't know how to inject that. I saw nothing about this under Configuring ESLint or Create React App Custom Environment Variables
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:
--cache-location
Path to the cache location. Can be a file or a directory. If none specified .eslintcache will be used. The file will be created in the directory where the eslint command is executed.
https://eslint.org/docs/2.0.0/user-guide/command-line-interface#caching
It seems that cache was enabled on purpose here: https://github.com/facebook/create-react-app/pull/9911
It seems that cache was enabled on purpose here: #9911
Yes bt as @silverwind said it should be there in the node_modules/.cache/.eslintcache
I think the main issue is a bad default location coming from eslint, see https://github.com/eslint/eslint/issues/13897.
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.
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.
Still generates
A fix seems to be in progress https://github.com/facebook/create-react-app/pull/9977. Looks like the plan is to move .eslintcache into node_modules/.cache
A fix seems to be in progress #9977. Looks like the plan is to move
.eslintcacheintonode_modules/.cache
As far as I understand that fix has nothing to do with an issue described by @dominikabieder
Not only it is annoying, it 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.