Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable javascript compile warnings in VS 2010?

Visual studio seems intent that my javascript code is bad, mostly because it has no knowledge of jquery or some plugins I am using. Therefore, every time I compile my product it gives me a lot of warnings, most of them are incorrect ($ is not defined, window is not defined, etc...).

I have /// <reference path="" /> tags setup in my javascript with intellisense working properly so I know these are just not real issues.

How can I disable these warnings?

edit to be clear, I need these disabled because it's causing 100+ warnings that are making me lose sight of REAL c# warnings.

like image 699
KallDrexx Avatar asked Apr 26 '12 13:04

KallDrexx


People also ask

How do you suppress warnings in VS code?

To suppress specific warnings for Visual Basic vbproj file to suppress specific compiler warnings. In Solution Explorer, choose the project in which you want to suppress warnings. On the menu bar, choose Project > Unload Project.

How do I turn on compiler warnings in Visual Studio?

If you want to turn it on (or off) in the project setting, you have to go to: Configuration Properties -> C/C++ -> Command Line and then under Additional Options you can enter: /w3#### to set your warning to level 3, and thus enable it; or you can enter /wd#### to disable a warning.


2 Answers

I had the exact same issue you were having: 100s of incorrect errors every save. For me the issue was with Chirpy, which was a prerequisite for another extension. For whatever reason on my end, Chirpy was not in my Extension Manager so it took me a while to find.

Check and see if you have it installed. If so disable JSHint.

  1. Tool -> Options
  2. Chirpy -> JSHint
  3. Uncheck: Run JS Hint
like image 90
johlrich Avatar answered Sep 18 '22 10:09

johlrich


try this and let me know if it works.

Enter the options through Tools > Options.

In the tree to the left, choose Text Editor > JScript > Miscellaneous. Uncheck "Show syntax errors".

like image 35
Rob Allen Avatar answered Sep 22 '22 10:09

Rob Allen