Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-jslint

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-jslint - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

test/editions.js

41

lib/jslint.js
'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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc