1 load("build/jslint.js");
3 var src = readFile("dist/jquery.js");
5 JSLINT(src, { evil: true, forin: true, maxerr: 100 });
7 // All of the following are known issues that we think are 'ok'
8 // (in contradiction with JSLint) more information here:
9 // http://docs.jquery.com/JQuery_Core_Style_Guidelines
11 "Expected an identifier and instead saw 'undefined' (a reserved word).": true,
12 "Use '===' to compare with 'null'.": true,
13 "Use '!==' to compare with 'null'.": true,
14 "Expected an assignment or function call and instead saw an expression.": true,
15 "Expected a 'break' statement before 'case'.": true
19 var e = JSLINT.errors, found = 0, w;
21 for ( var i = 0; i < e.length; i++ ) {
24 if ( !ok[ w.reason ] ) {
26 print( "\n" + w.evidence + "\n" );
27 print( " Problem at line " + w.line + " character " + w.character + ": " + w.reason );
32 print( "\n" + found + " Error(s) found." );
35 print( "JSLint check passed." );