【问题标题】:How to add TSLint into TFS build如何将 TSLint 添加到 TFS 构建中
【发布时间】:2017-10-08 02:34:09
【问题描述】:

如果 TSLint 出现任何错误,我想使构建失败。如何将其集成到 VSTS(TFS 在线)构建中?

【问题讨论】:

    标签: azure-devops tslint


    【解决方案1】:

    如果 TSLint 出现任何错误,则构建步骤已经失败。 例如:

    1. npm 步骤/任务(npm 命令:安装;参数:tslint typescript -g)
    2. 命令行步骤/任务(工具:tslint;参数:app.ts;工作文件夹:$(Build.SourcesDirectory)

    tslint.json 示例:

    {
        "defaultSeverity": "error",
       "extends": [
            "tslint:recommended"
        ],
        "jsRules": {},
        "rules": {
            "member-access": [true, "no-public"]
        },
        "rulesDirectory": []
    }
    

    【讨论】:

    • 嗨,我收到了这个错误:'tslint' is not recognized as an internal or external command。我按照您的指示成功完成了第一项任务。任何想法? ta
    • 详细的构建日志是什么?您可以在 OneDrive 上共享它。 support.office.com/en-us/article/…
    猜你喜欢
    • 2018-11-14
    • 2018-12-11
    • 2017-06-15
    • 1970-01-01
    • 1970-01-01
    • 2023-04-03
    • 1970-01-01
    • 1970-01-01
    • 2018-07-15
    相关资源
    最近更新 更多