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