• fr
  • Getting started with TsLint and tslint-consistent-codestyle in Angular 5+ projects, Part 2: VSTS builds integration

    This article is the continuation of the following article: Getting started with TsLint and tslint-consistent-codestyle in Angular 5+ projects, Part 1: Visual Studio Code

    Introduction

    This article will help you configure TSLINT and some more code style rules to enforce consistent code style in your Angular application.
    We are using Angular 5 in Visual Studio Code for this tutorial and VSTS to run a Continuous Integration (CI) build.

    Step 1

    Create a build definition in VSTS.

    Configure your source repository location.

    Step 2

    Setup your agent phase, name it and select an Agent queue:

    Step 3

    Install dependencies simply by selecting the “install” command:

    Step 4

    Configure the build using a “custom” command like this:

    Step 5

    Configure TsLint using a “custom” command like this:

    Step 6

    Run the VSTS CI build and check your log ?

    If your code doesn’t respect your TsLint rules it should make your build fail:

    Let's get acquainted
    Want to learn more and/or collaborate with us?

    We can't wait to hear from you.