![](/img/trans.png)
[英]ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint"
[英]couldn't find the plugin “eslint-plugin-promise”
我已經完成了以下操作以在全局范圍內使用 eslint,因此不會在每個新項目上重復,但我無法讓 eslint 插件部分工作。 我錯過了什么步驟:
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"plugins": [
"promise"
]
}
我希望當我在任何目錄中運行 eslint 時,插件都會被知道。 所以在我的工作目錄中,我添加了 a.eslintrc.json 以及我想要應用的所有規則,但我得到了這些錯誤:
1:1 error Definition for rule 'promise/always-return' was not found promise/always-return
1:1 error Definition for rule 'promise/catch-or-return' was not found promise/catch-or-return
1:1 error Definition for rule 'promise/no-nesting' was not found promise/no-nesting
現在,如果我將其添加到 local.eslintrc
"plugins": [
"promise",
],
我收到此錯誤:ESLint 找不到插件“eslint-plugin-promise”。 並建議我在本地安裝它。 但這正是我想要避免的。
嘗試升級到最新版本的ESLint
並確保在.eslintrc.json
中正確配置
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.