Open GoogleCodeExporter opened 9 years ago
I've never even seen someone try to use an anonymous block in JS before,
precisely because there is no block scope. Is it even technically valid JS?
Either way, we probably shouldn't crash on this, and it would be a useful lint
error though not a high priority to implement since I don't think many people
make the mistake in the first place.
Checking the Closure Compiler, it seems to automatically remove these anonymous
blocks but doesn't error or warn on them, at least with the default settings on
http://closure-compiler.appspot.com/home.
Original comment by a...@google.com
on 8 Apr 2011 at 9:00
I am affected by this bug, too. It happened to me while linting a long, complex
minified file. (jquery.dataTables.min.js from the popular datatables plugin for
jQuery)
Original comment by knb.fin...@gmail.com
on 30 Sep 2014 at 1:10
forgot to say that I was using gjslint v2.3.13
gjslint --disable 131,1,2,5,10,11,300,-002 --nojsdoc --max_line_length 12000
jquery.dataTables.min.js
Line 154, E:-002: Error parsing file at token "<JavaScriptToken: 154, }, "}",
{}, MetaData(None)>". Unable to check the rest of file.
Error "None"
Found 1 errors, including 0 new errors, in 1 files (0 files OK).
Original comment by knb.fin...@gmail.com
on 30 Sep 2014 at 1:17
Original issue reported on code.google.com by
oseem...@gmail.com
on 12 Mar 2011 at 9:53