Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set up TSLint for VS2017

I have tried to install this plugin: Web Analyzer, but unfortunately it can not be installed in VS 2017. It showed:

VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.

I am wondering whether there is a way to set up tslint in VS or there is any other way to check the syntax?

like image 996
Kuawiiii Avatar asked Mar 16 '17 03:03

Kuawiiii


2 Answers

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!

like image 173
Dan Avatar answered Sep 23 '22 09:09

Dan


Thanks to Rich N, now there is TypeScript Analyzer for Visual Studio 2017. See his answer to an SO question on the same topic here.

like image 40
Hermann.Gruber Avatar answered Sep 26 '22 09:09

Hermann.Gruber