Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSLint "Stopping" in Visual Studio

I installed JSLint into VS2010. It works great, except that after it gets to line 50 of the file it is checking, it halts with the message JS Lint: Stopping. (37% Scanned).

When I put the same JS into JSFiddle, and use the JSLint tool there...I get a report that spans the entire file. How can I make the JSLint in Visual Studio scan the entire file?

like image 410
Brent Arias Avatar asked Mar 08 '12 18:03

Brent Arias


1 Answers

Does it report a validation error on line 50? Perhaps if you could list the content of line 50, somebody may know what feature it does not like.

JSLint unfortunately stops scanning when it comes across a loop with a variable that wasn't defined outside the loop, e.g.

for (var i=0; i < x; i++)

JSLint gets mighty upset if you declare a variable like shown - I think it is to do with the potentially you have not realising that the variable does not have loop scope.

I had a quick play with JSFiddle's JSLint and I could not get it to report anything as an error, so either this doesn't work or it uses an old JSLint, which doesn't include the feature that causes it to stop in Visual Studio. Does it fail when using http://www.jslint.com/?

like image 107
Glenn Roberts Avatar answered Oct 12 '22 08:10

Glenn Roberts