简体   繁体   中英

Run tslint on build in VS2015

I have VS2015 Update 3 and I have some TypeScript files that should be checked by the tslint, but I can't get TSLint to analyze project on build (or preferably on the fly).

When I open a *.ts file, the Error List window displays lint warnings from the file, but once I close it, they disappear.

When I run Code Analysis on an individual *.ts file (Run Web Code Analysis), the warnings appear (whether file is closed or open), but when I run Code Analysis on the whole project, it looks like everything a fine (=no warnings, although there should be some).

I tried to enable "Enable Code Analysis on Build", in project properties (under Code Analysis tab), but it also didn't generate any warnings.

Basically I can get TSLint warnings only on individual files(open them/run Web Code Analysis), but I want them automatically for the whole project (Run Code Analysis).

The linters under Tools -> Web Code Analysis are from .NET Core Tools and at this time it seems that they are limited to opened files.

There is an issue to solve this: https://github.com/aspnet/Tooling/issues/718

It seems that I would have to find some other extension to make it work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM