javascript - 为什么用于导入订单的 Eslint 插件在 CRA 中不起作用?
问题描述
我安装eslint-plugin-import-order
并添加eslintConfig
到package.json
.
我有错误:
Definition for rule 'import/order' was not found (import/order)
请帮我处理它。
解决方案
注意: eslint-plugin-import-order
已弃用。请使用这个
https://github.com/benmosher/eslint-plugin-import
创建一个.eslintrc.json
文件并添加插件,如下所示。
{
....,
"extends": ["eslint:recommended", "plugin:import/errors", "plugin:import/warnings"],
"plugins": ["import"],
.....
}
重新启动一次本地服务器以确保反映更改。
推荐阅读
- excel-formula - Excel:如果新客户在 x 个月后离开,则给定月份的客户数
- javascript - Ionic 3:如何随时在外部键盘上获取 keydown/keypress 事件
- list - 如何在haskell中显示给定范围的列表
- java - 如何使用 javaparser 获取 switch 语句的数据类型?
- postgresql - 连接两个一对多表会重复记录
- javascript - 如何从 Google Places API 获取菜单和产品列表的数据?
- angular-cli - 从路由中检查成功变量并在 Angular 中进行比较
- c++ - setup.h 没有这样的文件或目录
- html - list-style-image 项目符号显示不合适
- python - 从单词列表中计算元音并将数字作为列表返回