首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >升级nx/角钢后,Linting速度非常慢。插件:导入/不反对

升级nx/角钢后,Linting速度非常慢。插件:导入/不反对
EN

Stack Overflow用户
提问于 2021-10-26 16:32:26
回答 1查看 783关注 0票数 9

在nx升级过程( 11.2.11 )期间,该项目已从12.2.10升级到了nx migrate

现在,代码线段从30秒增加到4分:

代码语言:javascript
运行
复制
 time TIMING=1 ng lint my-app

> nx run my-app:lint 

Linting "my-app"...

All files pass linting.

Rule                                       |  Time (ms) | Relative
:------------------------------------------|-----------:|--------:
import/no-deprecated                       | 204887.182 |    99.6%
@nrwl/nx/enforce-module-boundaries         |    260.016 |     0.1%
@typescript-eslint/naming-convention       |     83.345 |     0.0%
max-len                                    |     66.311 |     0.0%
comma-dangle                               |     40.576 |     0.0%
no-global-assign                           |     23.094 |     0.0%
@typescript-eslint/no-unused-vars          |     22.934 |     0.0%
@typescript-eslint/type-annotation-spacing |     22.831 |     0.0%
no-misleading-character-class              |     18.360 |     0.0%
@typescript-eslint/triple-slash-reference  |     16.281 |     0.0%

———————————————————————————————————————————————

>  NX   SUCCESS  Running target "lint" succeeded



real    3m41.726s
user    4m19.102s
sys     0m23.049s
代码语言:javascript
运行
复制
    "@angular-devkit/build-angular": "12.2.10",
    "@angular-eslint/eslint-plugin": "12.3.1",
    "@angular-eslint/eslint-plugin-template": "12.3.1",
    "@angular-eslint/template-parser": "12.3.1",
    "@angular/cli": "12.2.10",
    "@angular/compiler-cli": "12.2.10",
    "@angular/language-service": "12.2.10",
    "@angular/localize": "^12.2.10",
    ...
    "@nrwl/eslint-plugin-nx": "12.10.0",
    ...
    "eslint-plugin-import": "2.22.1",

eslint设置:"import/no-deprecated": "warn",

是否有任何设置更改或我应该删除此导入?

EN

回答 1

Stack Overflow用户

发布于 2022-11-18 11:25:49

看看你的应用程序tsConfig,在我的例子中,“包含”属性丢失了,所以衣棉时间太长了。

代码语言:javascript
运行
复制
    {
       "include": ["./src/**/*.ts"],
       "files": ["./src/main.ts", "./src/polyfills.ts"],
       "exclude": ["./src/test.ts", "**/*.spec.ts"]
   }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69726856

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档