如何在反应中删除 .eslintcache 文件? [英] How to delete .eslintcache file in react?
问题描述
我是 React 的新手.我有一个我无法解决的问题.我有一个.eslintcache"文件,它是在我使用create-react-app"在 React 中创建一个新应用程序后自动为我创建的.我不知道为什么我有这个文件.我试图删除它,但它总是回来.我运行了这个命令 - npm uninstall -g eslint --save"- 删除 eslint 的目录,但没有帮助.我不知道如何处理它,我没有找到解决方法,我很乐意提供帮助.
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.
推荐答案
这是 react 新版本的一部分.我也有文件reportWebVitals".和setupTests",我删除了它们,一切正常.
This is part of the new version in react. I also had files "reportWebVitals" and "setupTests", I deleted them and everything works properly.
使用reportWebVitals"您可以跟踪您网站上的真实用户表现.并使用setupTests"您正在初始化测试环境
With "reportWebVitals" you can track real user performance on your site. And with "setupTests" you are Initializing Test Environment
react-scripts@4.0.0 及更高版本提供此功能
this feature is available with react-scripts@4.0.0 and higher
我不需要这些属性,只是删除了它们,就是这样,eslintcache 不能被删除是包的一部分.
I do not need these properties, just deleted them and that's it, the eslintcache can not be deleted is part of the bundle.
这篇关于如何在反应中删除 .eslintcache 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!