3
votes

I am using Visual Studio Community 2015 with Web Essentials (if this is relevant). IntelliSense works fine when editing files.

But recently it started also generating multiple warnings about style, syntax etc. (This, maybe, happened after I updated VS to version 14.0.25431.01 Update 3; or have I updated Web Essentials too?).

I really like some of these warnings, but they are drowned in the warnings that are of no use for me:

enter image description here

The warnings there have links to the rules, all pointing to Palantir's tslint on Github. However, I cannot find a way to configure this tool (if Visual Studio's IntelliSense indeed uses tslint). I never installed it explicitly, I do not have tslint.json file on my computer.

I know that I can filter in the Warning window to show only a certain keyword. But how can I configure IntelliSense to suppress some rules?

2
Yeah, that's not intellisense (that's just what shows you the members when you hit .). As it mentions on that website, you can add a tslint.json file which will configure tslint, or you can look in Tools, Options for the Web Essentials area, where I believe there's a way of turning it off.Heretic Monkey

2 Answers

2
votes

Found very similar question, Configure tslint with VS 2015 Update 2. It helped to dig around.

Turns out, this tslint is indeed run by VS, this facility is called 'Web Code Analysis'. There is tslint.json file in the Users\ folder, it is accessible via Tools|Web Code Analysis menu. (Actually, this menu shows a few other lint tools too, and I do not know how to tell which of them are run. The referenced question says that you can see it using process monitor; I do not use it.)

You can place another tslint.json file in the project root folder and have project-specific settings. Beware that it should be saved in UTF-8 encoding and not in UTF-8-BOM or ANSI, for example. Also beware that placing // comments there may stop tclint from working.

1
votes

In visual studio community 2015 Update 3 there is a menu named

 Tools > Web code analysis > Edit TSLint settings

That opens up the \user[username]\tslint.json file. This menu also has other linting files that you can edit, and the warnings "respects" those rules (for me at least)