最近,我将我的 Angular 9 项目从 tslint 迁移到了 eslint。目前,这是我 package.json
中的版本:
"@typescript-eslint/eslint-plugin": "^3.1.0",
"@typescript-eslint/eslint-plugin-tslint": "^3.1.0",
"@typescript-eslint/parser": "^3.1.0",
"eslint": "^7.2.0"
运行 eslint 后,我得到了大量的错误(确切地说是 1000 多个),其中大部分要么是:
1:1 error Definition for rule '@angular-eslint/component-class-suffix' was not found @angular-eslint/component-class-suffix
1:1 error Definition for rule '@angular-eslint/component-selector' was not found @angular-eslint/component-selector
1:1 error Definition for rule '@angular-eslint/directive-class-suffix' was not found @angular-eslint/directive-class-suffix
1:1 error Definition for rule '@angular-eslint/directive-selector' was not found @angular-eslint/directive-selector
或者:
1:1 error Definition for rule '@typescript-eslint/class-name-casing' was not found @typescript-eslint/class-name-casing
1:1 error Definition for rule '@typescript-eslint/tslint/config' was not found @typescript-eslint/tslint/config
我尝试研究解决这个问题的方法,但到目前为止没有什么进展,而且我似乎找不到应该在哪里定义这些缺失的规则?