简体   繁体   English

在Angular中用多个项目迁移TSLint到ESLint,ng lint命令挂起

[英]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中,在parserOptionsproject数组,我添加了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.

相关问题 带有 Angular 7 和 `ng lint` 的 TypeScript 中的自定义 TSLint 规则 - Custom TSLint Rule in TypeScript with Angular 7 and `ng lint` Nx Angular TSLint 到 ESLint 迁移后的 Lint 错误 - Nx Angular Lint Error after TSLint to ESLint Migration 出现 Angular Migrate TSLint to ESLint Banana-In-Box 错误 - Having Angular Migrate TSLint to ESLint Banana-In-Box Error 将 tslint 迁移到 @angular-eslint/schematics:ERESOLVE 无法解析依赖树:@angular/compiler@12.1.2 - Migrate tslint to @angular-eslint/schematics: ERESOLVE unable to resolve dependency tree: @angular/compiler@12.1.2 Tslint 到 Eslint 迁移 - convert-tslint-to-eslint 命令后出错 - Tslint to Eslint migration - Error after convert-tslint-to-eslint command 不支持:关键字“id”,使用“$id”作为模式 ID:TSLint(ng add @angular-eslint/schematics) - NOT SUPPORTED: keyword "id", use "$id" for schema ID : TSLint (ng add @angular-eslint/schematics) Ng 构建到多个项目 angular - Ng build to multiple projects angular 在干净的 Angular 项目中运行“ng lint”时,eslint 会为另一个文件夹中完全不同的项目提供错误 - When running "ng lint" in a clean Angular project eslint gives errors for a completely different project in another folder tslint / codelyzer / ng lint 错误:“for (... in ...) 语句必须用 if 语句过滤” - tslint / codelyzer / ng lint error: “for (… in …) statements must be filtered with an if statement” 如何运行@angular-eslint/schematics:convert-tslint-to-eslint - How to run @angular-eslint/schematics:convert-tslint-to-eslint
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM