Set up TSLint for VS2017

Now that TypeScript has language server plugins support and there's TSLint plugin, another option is available:

  • Install Visual Studio 2017 Update 2
  • Install TypeScript 2.3 for Visual Studio (This is not only for VS 2015 but also for VS 2017 Update 2)
  • Put tslint.json in C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.3 or any of its parent directories and run npm install typescript tslint tslint-language-service (Visual Studio doesn't search for tslint.json or plugins in the project folder)
  • Add "plugins": [{ "name": "tslint-language-service" }] to compilerOptions in your tsconfig.json

Now TSLint in Visual Studio should work:

enter image description here


Since this is the top google result, I wanted to add a more recent answer. Microsoft has a tslint plugin now that works with Typescript 3+ and across Visual Studio, VSCode and other editors:

https://github.com/Microsoft/typescript-tslint-plugin

Setup

Install Dependencies

npm install --save-dev typescript tslint typescript-tslint-plugin

Add to tsconfig.json:

{
  "compilerOptions": {
    "plugins": [
      {
        "name": "typescript-tslint-plugin"
      }
    ]
  }
}

Develop with lint!