Sha256: 8dee13fd302d9640d28cf1fd92df1485d07ffa75f762fa3a93b8fbb9cf727cb3

Contents?: true

Size: 646 Bytes

Versions: 10

Compression:

Stored size: 646 Bytes

Contents

var jshint = require('jshint').JSHINT,
	fs = require('fs'),
	config = require('./hintrc.js').config;

function jshintSrc(path, src) {
	jshint(src, config);
	
	var errors = jshint.errors,
		i, len, e, line;
	
	for (i = 0, len = errors.length; i < len; i++) {
		e = errors[i];
		//console.log(e.evidence);
		console.log(path + '\tline ' + e.line + '\tcol ' + e.character + '\t ' + e.reason);
	}
	
	return len;
}
	
exports.jshint = function (files) {
	var errorsFound = 0;
	
	for (var i = 0, len = files.length; i < len; i++) {
		var src = fs.readFileSync(files[i], 'utf8');
		
		errorsFound += jshintSrc(files[i], src);
	}
	
	return errorsFound;
};

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
leaflet-js-0.8.dev2 lib/leaflet.label/build/hint.js
leaflet-js-0.7.0.4 lib/leaflet.label/build/hint.js
leaflet-js-0.7.0.3 lib/leaflet.label/build/hint.js
leaflet-js-0.7.0.2 lib/leaflet.label/build/hint.js
leaflet-js-0.7.0.1 lib/leaflet.label/build/hint.js
leaflet-js-0.7.0 lib/leaflet.label/build/hint.js
leaflet-js-0.6.beta4 lib/leaflet.label/build/hint.js
leaflet-ruby-0.3.beta4 lib/leaflet/build/hint.js
leaflet-ruby-0.3.beta3 lib/leaflet/build/hint.js
leaflet-ruby-0.3.beta1 lib/leaflet/build/hint.js