在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.
请添加continueOnError
:
- script: |
npm run lint > tsLintReport.txt
displayName: 'ng lint'
continueOnError: true
它不会破坏构建,但构建最终会出现问题。
尝试运行"npm运行lint---fix";这将自动修复棉绒错误