forked from jquery/jquery
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git://github.com/jquery/jquery
- Loading branch information
Showing
20 changed files
with
5,996 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
load("build/jslint.js"); | ||
|
||
var src = readFile("dist/jquery.js"); | ||
|
||
JSLINT(src, { evil: true, forin: true }); | ||
|
||
// 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 | ||
|
||
}; | ||
|
||
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." ); | ||
|
||
} else { | ||
print( "JSLint check passed." ); | ||
} |
Oops, something went wrong.