grunt-jslint
Advanced tools
Comparing version 1.1.4 to 1.1.5
'use strict'; | ||
var fs = require('fs'); | ||
var vm = require('vm'); | ||
var path = require('path'); | ||
module.exports = {}; | ||
var nodelint = require('jslint/lib/nodelint'); | ||
var fs = require('fs'), | ||
vm = require('vm'), | ||
path = require('path'), | ||
nodelint = require('jslint/lib/nodelint'), | ||
jslint = module.exports; | ||
// define public API | ||
var jslint = module.exports = {}; | ||
/** | ||
@@ -57,10 +56,10 @@ * The `JSLINT` function | ||
jslint.runner = function (files, opts, cb) { | ||
var pending = files.length; | ||
var report = { | ||
files: {}, | ||
failures: 0, | ||
file_count: files.length, | ||
files_in_violation: 0 | ||
}; | ||
var done = false; | ||
var pending = files.length, | ||
report = { | ||
files: {}, | ||
failures: 0, | ||
file_count: files.length, | ||
files_in_violation: 0 | ||
}, | ||
done = false; | ||
@@ -84,6 +83,6 @@ if (opts.edition) { | ||
report.failures += violations.length; | ||
report.files_in_violation++; | ||
report.files_in_violation += 1; | ||
} | ||
pending--; | ||
pending -= 1; | ||
if (!pending) { | ||
@@ -120,5 +119,7 @@ done = true; | ||
if (opts.shebang) { | ||
// remove shebang lines for binary files | ||
// remove shebang lines for executable files | ||
// e.g. `#!/usr/bin/env node` | ||
/*jslint regexp: true*/ | ||
source = source.replace(/^\#\!.*/, ''); | ||
/*jslint regexp: false*/ | ||
} | ||
@@ -128,4 +129,4 @@ | ||
var violations = JSLINT.errors; | ||
var res = []; | ||
var violations = JSLINT.errors, | ||
res = []; | ||
@@ -132,0 +133,0 @@ violations.forEach(function (violation) { |
@@ -7,2 +7,3 @@ exports.checkstyle = require('./check-style'); | ||
/*jslint nomen: true*/ | ||
exports._util = require('./util'); |
@@ -14,6 +14,6 @@ 'use strict'; | ||
Object.keys(report.files).forEach(function (file) { | ||
var parts = file.split(/[\\\/]/).filter(function (part) { return part; }); | ||
var classname = parts.join('.').replace(/\.js$/i, '').replace(/-/g, '_'); | ||
var filename = path.basename(file, '.js'); | ||
var failures = report.files[file]; | ||
var parts = file.split(/[\\\/]/).filter(function (part) { return part; }), | ||
classname = parts.join('.').replace(/\.js$/i, '').replace(/-/g, '_'), | ||
filename = path.basename(file, '.js'), | ||
failures = report.files[file]; | ||
@@ -20,0 +20,0 @@ if (failures.length) { |
{ | ||
"name": "grunt-jslint", | ||
"description": "Validates JavaScript files with JSLint", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"homepage": "https://github.com/stephenmathieson/grunt-jslint", | ||
@@ -10,2 +10,5 @@ "author": { | ||
}, | ||
"contributors": { | ||
"name": "Sam Mikes" | ||
}, | ||
"repository": { | ||
@@ -33,3 +36,3 @@ "type": "git", | ||
"dependencies": { | ||
"jslint": "~0.2" | ||
"jslint": ">=0.2.11" | ||
}, | ||
@@ -36,0 +39,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
264197
44
5499
4
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbuffer-shims@1.0.0(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedexit@0.1.2(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.1.7(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedjslint@0.12.1(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addednopt@4.0.3(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedosenv@0.1.5(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedprocess-nextick-args@1.0.7(transitive)
+ Addedreadable-stream@2.1.5(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedjslint@0.2.11(transitive)
- Removednopt@1.0.10(transitive)
Updatedjslint@>=0.2.11