X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=build%2Fjslint-check.js;h=72d67018760eb55913c6ecb8600260045df74aeb;hp=e76abc0a7bd900496b03e8e1b71c5a91b01e2274;hb=5b421fed003e6704bd0fbba2dea5c1b6add2cf52;hpb=a2e1051fb4b2065fb5ebea49dc0bcc583d113187 diff --git a/build/jslint-check.js b/build/jslint-check.js index e76abc0..72d6701 100644 --- a/build/jslint-check.js +++ b/build/jslint-check.js @@ -1,6 +1,6 @@ -load("build/jslint.js"); - -var src = readFile("dist/jquery.js"); +var JSLINT = require("./lib/jslint").JSLINT, + print = require("sys").print, + src = require("fs").readFileSync("dist/jquery.js", "utf8"); JSLINT(src, { evil: true, forin: true, maxerr: 100 }); @@ -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" ); }