Ghrhrrv146

一个很奇怪的问题,暂存区只有一个文件时, eslint 检查很慢,两个文件以上就很快了

  •  
  •   Ghrhrrv146 · Oct 15, 2023 · 1657 views
    This topic created in 950 days ago, the information mentioned may be changed or developed.

    执行的命令是 eslint --ext .js,.vue src --fix --cache

    使用 timing=1 分析过,最耗时间的规则是 prettier/prettier ,达到了近 60 秒, 但是如果暂存区两个以上文件,eslint 检查三四秒就通过了。

    实在想不通

    Supplement 1  ·  Oct 15, 2023
    有个地方没说清楚。
    当暂存区只有一个文件时,耗时一到两分钟,如果有两个以上文件,半分钟就好了。

    上面说的六十秒是指针对整个 src ,执行 prettier/prettier 规则的时间
    Supplement 2  ·  Oct 15, 2023
    半分钟 -> 三四秒

    晚上了,脑子有点混乱/🤦‍
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2880 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 14:37 · PVG 22:37 · LAX 07:37 · JFK 10:37
    ♥ Do have faith in what you're doing.