1

我在提交文件之前使用Husky来检查文件。

但是今天突然遇到一些奇怪的问题,如下所示

╰─ node_modules/husky/run.js pre-commit husky > pre-commit (node v10.15.0)   ↓ Stashing changes... [skipped]
    → No partially staged files found...   ❯ Running tasks...
    ❯ Running tasks for {src}/**/*.{js,ts}
      ✖ tslint -c tslint.json
        git add



⚠ tslint -c tslint.json was terminated with SIGABRT
 husky > pre-commit hook failed (add --no-verify to bypass).

我试过谷歌和许多 StackOverflow 链接,但没有运气。任何帮助表示赞赏。

4

1 回答 1

0

所以我最终-- no-verify在提交命令的末尾使用了标志,因为我的项目在 GitHub 上运行了检查,lint所以如果这些检查失败,那么问题出在代码上,如果没有,那么它一定是文本编辑器的问题。

于 2021-09-14T06:33:04.970 回答