I am working with Ext Js and Visual Studio. With _references.js I can get the intellisense working. I can add a definition for "Ext" in here for JsHint:
But it still thows 500 errors about ext-all-debug.js
I am wondering if using JsHint here adds any value to my project. Visual Studio seems to take care of true JavaScript syntax errors.
Some examples of the warnings:
JsHint (W116): Expected '===' and instead saw '=='.
or:
JsHint (W083): Don't make functions within a loop.
Should I disable JSHint completely or try to configure it better?
When a major framework does not respect the rules then why should I?
Update: In web essentials you can create a file called something.weignore. It follows the same syntax than .jshintignore.
You definitely shouldn't be running the linter over ext-all-debug.js. Ignore that using a file called .jshintignore in the root of your project and put the path of ext-all-debug.js in there. An example of the content of .jshintignore could be:
This would tell jshint to ignore jquery.js and extjs. You can also exclude whole directories. Take a look at the jshint ignore for the jQuery project:
https://github.com/jquery/jquery/blob/master/.jshintignore
Maybe Ext JS is working to address those errors internally, maybe they just don't care. But don't let another person's code practises negatively affect your own. If you feel you'll be writing better code by using jshint then use it! There are good reasons behind the warnings you are seeing.