[英]Nx Angular Lint Error after TSLint to ESLint Migration
I'm very new to Nx and today I tried to migrate all our Angular apps from TSLint to ESLint.我对Nx很陌生,今天我尝试将我们所有的 Angular 应用程序从 TSLint 迁移到 ESLint。 What I did was to run the following command for each app:
我所做的是为每个应用程序运行以下命令:
nx g convert-tslint-to-eslint --project=SELECTED_PROJECT
After the migration I ran npm install and then npm run lint .迁移后,我运行npm install然后npm 运行 lint 。 But each time I run the linter, I get the following error without any detailed information:
但是每次运行 linter 时,我都会收到以下错误,但没有任何详细信息:
Cannot read properties of undefined (reading 'start')
无法读取未定义的属性(读取“开始”)
The project specs:项目规格:
Any idea what might be wrong?知道可能出了什么问题吗?
I found the origin on the problem.我找到了问题的根源。 The issue is related with this ESLint rule:
该问题与此 ESLint 规则有关:
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
Have no idea why it's breaking with this rule.不知道为什么它违反了这条规则。 For now I removed it and using the overrides to apply this rule:
现在我删除了它并使用覆盖来应用这个规则:
"@typescript-eslint/indent": [
"error",
4,
{
"FunctionDeclaration": {
"parameters": "first"
},
"FunctionExpression": {
"parameters": "first"
}
}
],
If anyone finds a better way to solve this issue, please let me know.如果有人找到解决此问题的更好方法,请告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.