diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2011-12-08 20:42:47 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2011-12-08 21:04:57 -0500 |
commit | 98386cfd775fdfa7837ccbec173b04f1e6d57896 (patch) | |
tree | 74783699ba88a0bf17bfb88e8b3e8141b7c868fe /build/jslint-check.js | |
parent | d6500cc8ded8d3d02e19a3ab831b6b9cf43e82ae (diff) | |
download | jquery-98386cfd775fdfa7837ccbec173b04f1e6d57896.tar.gz jquery-98386cfd775fdfa7837ccbec173b04f1e6d57896.zip |
Fix #10692. JSLint is dead! Long live JSHint!
Still needs this sizzle PR: https://github.com/jquery/sizzle/pull/82
Diffstat (limited to 'build/jslint-check.js')
-rw-r--r-- | build/jslint-check.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/build/jslint-check.js b/build/jslint-check.js deleted file mode 100644 index 72d670187..000000000 --- a/build/jslint-check.js +++ /dev/null @@ -1,36 +0,0 @@ -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 }); - -// All of the following are known issues that we think are 'ok' -// (in contradiction with JSLint) more information here: -// http://docs.jquery.com/JQuery_Core_Style_Guidelines -var ok = { - "Expected an identifier and instead saw 'undefined' (a reserved word).": true, - "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, - "'e' is already defined.": true -}; - -var e = JSLINT.errors, found = 0, w; - -for ( var i = 0; i < e.length; i++ ) { - w = e[i]; - - if ( !ok[ w.reason ] ) { - found++; - print( "\n" + w.evidence + "\n" ); - print( " Problem at line " + w.line + " character " + w.character + ": " + w.reason ); - } -} - -if ( found > 0 ) { - print( "\n" + found + " Error(s) found.\n" ); - -} else { - print( "JSLint check passed.\n" ); -} |