You've got some JS*H*int options (like eqeqeq, apparently) in the jslint
line. It's choking there.
So change...
/*jslint browser: true, forin: true, white: false, on: true, fragment: true, eqeqeq: true */
... to ...
/*jslint browser: true, forin: true, white: false */
... and I bet it works.
Note: It's almost always a good idea to get a simplest case example of code that's screwing up in JSLint and paste it into JSLint.com. Crockford keeps that URL all but up to the minute with JSLint's github repo, and it was reporting a much more user-friendly error (Unexpected 'on'.
) than the unfortunate "JSLint's confused" it was telling you.
Just to make sure there wasn't something else making JSLint think there were 1000+ errors, I changed your white
to true
, removed the unused w
and d
, and another change or two so that it'd pass linting, and this works on jslint.com:
/*jslint browser: true, forin: true, white: true, sloppy: true */
var app = (function () {
'use strict';
var foo = 'bar';
return {
init : function() {
window.console.log(foo);
}
};
}(window, document));
window.onload = app.init;
So it's probably just those JSHint-specific settings that don't work in JSLint that was borking things.