1
Vote

JSLint Stops on For Loop

description

Every time JSLint comes across a For loop in my code, it stops prematurely.
for (var i = 0; i < attributes.length; i++) {
Warning 2 JS Lint: Stopping. (24% scanned).

comments

dgersten wrote Apr 30, 2013 at 12:17 PM

try moving your var declaration outside.

Nitron_F117 wrote Apr 30, 2013 at 12:52 PM

That does work, but the var declaration inside the for loop is valid and should not break the tool.

Qube wrote May 8, 2013 at 12:44 AM

JSLint for Visual Studio runs jslint.js without any alterations. If it's not behaving as you expect, I recommend raising it with the author of JSLint:
https://plus.google.com/communities/104441363299760713736

I believe this is a known issue though, and there is probably already a discussion for it on the old Yahoo group:
http://tech.groups.yahoo.com/group/jslint_com/