Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete .eslintcache file in react?

Tags:

reactjs

I'm new to React. I have a problem I can not solve. I have an ".eslintcache" file, which was created for me automatically as soon as I created a new app in React using "create-react-app". I do not know why I have this file. I tried to delete it but it always comes back. I ran this command - "npm uninstall -g eslint --save" - to delete eslint's directory but it does not help. I do not know how to handle it, I did not find a solution to it, I would be happy to help.

enter image description here

like image 785
dust Avatar asked Nov 30 '20 18:11

dust


People also ask

Can I delete .eslintcache file?

Yes, from version 4.0. 0. Don't just delete things, read about them before you delete.

What is .eslintcache file?

To be able to track which files changed, and which errors occured in the files which were not changed, eslint is writing a cache (into the file you found). Usually that file is supposed to be in /node_modules/. cache/ , so you usually won't notice it.

How do I uninstall old version react?

The following steps solved the problem of removing an old version and creating a create-react-app. 1 Check version of create-react-app, using npx create-react-app -V . 2 Uninstall any global version of create-react-app, using either npm uninstall -g create-react-app or yarn global remove create-react-app .


1 Answers

It is part of the CRA bundle. I'd recommend just adding it to the .gitignore file if it isn't in there already.

From the ESLint docs:

Store the info about processed files in order to only operate on the changed ones. The cache is stored in .eslintcache by default. Enabling this option can dramatically improve ESLint's running time by ensuring that only changed files are linted.

like image 91
Dean James Avatar answered Sep 26 '22 06:09

Dean James