X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=build%2Fjslint-check.js;h=72d67018760eb55913c6ecb8600260045df74aeb;hp=3e9c126396bfafcb8577d86710c442c00999904b;hb=5b421fed003e6704bd0fbba2dea5c1b6add2cf52;hpb=950b5d64a27994db1697eb4e605f5ea48ad8021b diff --git a/build/jslint-check.js b/build/jslint-check.js index 3e9c126..72d6701 100644 --- a/build/jslint-check.js +++ b/build/jslint-check.js @@ -1,8 +1,8 @@ -load("build/jslint.js"); +var JSLINT = require("./lib/jslint").JSLINT, + print = require("sys").print, + src = require("fs").readFileSync("dist/jquery.js", "utf8"); -var src = readFile("dist/jquery.js"); - -JSLINT(src, { evil: true, forin: true }); +JSLINT(src, { evil: true, forin: true, maxerr: 100 }); // All of the following are known issues that we think are 'ok' // (in contradiction with JSLint) more information here: @@ -12,8 +12,8 @@ var ok = { "Use '===' to compare with 'null'.": true, "Use '!==' to compare with 'null'.": true, "Expected an assignment or function call and instead saw an expression.": true, - "Expected a 'break' statement before 'case'.": true - + "Expected a 'break' statement before 'case'.": true, + "'e' is already defined.": true }; var e = JSLINT.errors, found = 0, w; @@ -29,8 +29,8 @@ for ( var i = 0; i < e.length; i++ ) { } if ( found > 0 ) { - print( "\n" + found + " Error(s) found." ); + print( "\n" + found + " Error(s) found.\n" ); } else { - print( "JSLint check passed." ); + print( "JSLint check passed.\n" ); }