I have tried to install this plugin: Web Analyzer, but unfortunately it can not be installed in VS 2017. It showed:
VSIXInstaller.NoApplicableSKUsExce
Now that TypeScript has language server plugins support and there's TSLint plugin, another option is available:
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)"plugins": [{ "name": "tslint-language-service" }]
to compilerOptions
in your tsconfig.json
Now TSLint in Visual Studio should work:
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.
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!
Web Analyser is there installed as part of Visual Studio 2017. The bad news: without tslint.
I suspect (was hoping) that it can be done using the taskrunner and gulp and piping the output back into the Visual Studio 2017 errors window (using the 'msbuild' output of tslint), but when I tried this I couldn't get it to work, and I don't have the time to work it out why. It may be this output option is not supported in vs2017.
My solution was to roll back to vs2015 community. (I also got back the code lens feature which I had grown to depend on.) I'm hoping that these things will come back to vs eventually, so I can move forward to some of the new features.
UPDATE: Rich Newman has written a replacement called TypeScript Analyzerfor vs2017 https://marketplace.visualstudio.com/items?itemName=RichNewman.TypeScriptAnalyzer