Sha256: 606f07b3cdecd8b1bdaa147688403ca274b4e508dacefa7377c0e7886fbf65b0

Contents?: true

Size: 1.03 KB

Versions: 8

Compression:

Stored size: 1.03 KB

Contents

load("build/jslint.js");

var src = readFile("dist/jquery.js");

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." );

} else {
	print( "JSLint check passed." );
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
compass-jquery-plugin-0.3.1.1 lib/jslint-check.js
compass-jquery-plugin-0.3.1.0 lib/jslint-check.js
compass-jquery-plugin-0.3.1.beta.3 lib/jslint-check.js
compass-jquery-plugin-0.3.1.beta.2 lib/jslint-check.js
compass-jquery-plugin-0.3.0.0 lib/jslint-check.js
compass-jquery-plugin-0.3.0.rc.1 lib/jslint-check.js
compass-jquery-plugin-0.3.0.beta.26 lib/jslint-check.js
compass-jquery-plugin-0.3.0.beta.25 lib/jslint-check.js