【发布时间】:2020-12-25 13:10:42
【问题描述】:
在 Azure Devops Build Pipeline 中运行 TSLint 时收到以下错误。 我想让构建管道继续下一步,即使有 lint 错误。 如何解决?
命令行:
- script: |
npm run lint > tsLintReport.txt
displayName: 'ng lint'
错误:
Lint warnings found in the listed files.
Lint errors found in the listed files.
Lint errors found in the listed files.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ipts@1.0.0 lint: `ng lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ipts@1.0.0 lint script.
【问题讨论】:
-
linting 失败,因为某些文件中存在 linting 错误。为他们检查
tsLintReport.txt。 -
我想让构建管道继续,即使有 lint 错误。 cc @AlexBiro 可以这样做吗
-
您必须配置您的 CI 以忽略 linting 的结果,我对 Azure CI 不熟悉。实际上,我不建议这样做,因为那样你可能永远无法解决这些问题,而且它们只会不断堆积。
标签: typescript azure-devops azure-pipelines tslint angular10