javascript - 如何为启动时间过长的 create-react-app 启用 eslint 缓存?
问题描述
我想知道为什么我的项目需要太长时间,我已经检查了一些关于它的主题,现在我认为这可能eslint cache
是react-scripts
.
这是结果TIMING=1 eslint .
Rule | Time (ms) | Relative
:----------------------------------------|----------:|--------:
react/no-direct-mutation-state | 1818.923 | 24.9%
react/no-typos | 812.661 | 11.1%
react/require-render-return | 765.499 | 10.5%
unused-imports/no-unused-imports | 592.197 | 8.1%
testing-library/await-async-utils | 233.464 | 3.2%
no-whitespace-before-property | 199.900 | 2.7%
testing-library/no-container | 154.535 | 2.1%
testing-library/no-debug | 145.567 | 2.0%
testing-library/no-promise-in-fire-event | 123.937 | 1.7%
testing-library/await-async-query | 120.638 | 1.7%
我想知道为什么 yarn start
,不会生成eslintcahce
.
我该如何解决这个问题?
解决方案
推荐阅读
- azure-functions - 登录 Azure Functions
- pygame - 重绘 Pygame 窗口的最佳方法是什么?
- swift - 了解比较可选字符串
- android - 无法解析 com.android.billingclient:billing:1.1
- mongodb - 尝试使用 mongdb 在 discord.js 中查找用户被静音的次数
- emacs - 有没有办法找到键绑定的文件行
- lucene - 使用 Lucene 7 OpenNLP 查询词性标签
- java - 为什么我的哈希表不能在更大的范围内工作?
- node.js - Node.js 请求 - 获取响应值不起作用
- c# - 如何将类属性分配给 Windows 表单变量上的点