[英]Migrate TSLint to ESLint in Angular with multiple projects, ng lint command hangs
I have successfully migrated another Angular 10 app with a single project from TSLint to ESLint, following the instructions of Angular ESLint .按照 Angular ESLint 的说明,我已经成功地将另一个带有单个项目的 Angular 10 应用程序从 TSLint 迁移到ESLint 。 When I try to migrate an Angular 10 app with multiple projects under the projects/ folder (ie 'app' and 'myLib') and try to run 'ng lint' or 'npx ng lint app', then I only see 'Linting "app"...' and the command seems to hang.
当我尝试迁移 Angular 10 应用程序时,在项目/文件夹下有多个项目(即“app”和“myLib”)并尝试运行“ng lint”或“npx ng lint app”,然后我只看到“Linting” app"...' 并且命令似乎挂起。 All required packages have been installed and the migration phase was errorless.
所有必需的软件包都已安装,并且迁移阶段没有错误。 Any ideas on the issue?
关于这个问题的任何想法?
The actual problem was that linter was executed very very slowly (so slow that seemed to hang, unless you use debug), so in order for the issue to be fixed, in the inner .eslintrc.json
of each project, under parserOptions
, in the project
array, I added tsconfig.json
实际的问题是 linter 执行得非常缓慢(如此缓慢以至于似乎挂起,除非你使用调试),所以为了解决这个问题,在每个项目的内部
.eslintrc.json
中,在parserOptions
下project
数组,我添加了tsconfig.json
"parserOptions": {
"project": [
"tsconfig.json",
"projects/app/tsconfig.app.json",
"projects/app/tsconfig.spec.json",
"projects/app/e2e/tsconfig.json"
]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.