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

jshint

Package Overview
Dependencies
Maintainers
2
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jshint - npm Package Compare versions

Comparing version 2.4.3 to 2.4.4

5

package.json
{
"name": "jshint",
"version": "2.4.3",
"version": "2.4.4",
"homepage": "http://jshint.com/",

@@ -41,3 +41,4 @@ "description": "Static analysis tool for JavaScript",

"htmlparser2": "3.3.x",
"console-browserify": "0.1.x"
"console-browserify": "0.1.x",
"exit": "0.1.x"
},

@@ -44,0 +45,0 @@

8

README.md
JSHint, A Static Code Analysis Tool for JavaScript
--------------------------------------------------
\[ [Use it online](http://jshint.com/) • [About](http://jshint.com/about/) •
[Docs](http://jshint.com/docs/) • [FAQ](http://jshint.com/docs/faq) •
[Install](http://jshint.com/install/) • [Hack](http://jshint.com/hack/) •
\[ [Use it online](http://jshint.com/) • [About](http://jshint.com/about/) •
[Docs](http://jshint.com/docs/) • [FAQ](http://jshint.com/docs/faq) •
[Install](http://jshint.com/install/) • [Hack](http://jshint.com/hack/) •
[Blog](http://jshint.com/blog/) • [Twitter](https://twitter.com/jshint/) \]
[![Build Status](https://travis-ci.org/jshint/jshint.png?branch=master)](https://travis-ci.org/jshint/jshint)
[![Build Status](https://travis-ci.org/jshint/jshint.png?branch=2.x)](https://travis-ci.org/jshint/jshint)
[![NPM version](https://badge.fury.io/js/jshint.png)](http://badge.fury.io/js/jshint)

@@ -11,0 +11,0 @@

@@ -9,2 +9,3 @@ "use strict";

var htmlparser = require("htmlparser2");
var exit = require("exit");
var JSHINT = require("./jshint.js").JSHINT;

@@ -257,2 +258,3 @@ var defReporter = require("./reporters/default").reporter;

var js = [];
var startOffset;

@@ -272,2 +274,3 @@ // Test if current tag is a valid <script> tag.

js.push.apply(js, code.slice(index, parser.endIndex).match(/\n\r|\n|\r/g));
startOffset = null;
}

@@ -281,7 +284,28 @@

index = parser.startIndex;
startOffset = null;
}
function ontext(data) {
if (inscript)
js.push(data); // Collect JavaScript code.
if (!inscript)
return;
var lines = data.split(/\n\r|\n|\r/);
if (!startOffset) {
lines.some(function (line) {
if (!line) return;
startOffset = /^(\s*)/.exec(line)[1];
return true;
});
}
// check for startOffset again to remove leading white space from first line
if (startOffset) {
lines = lines.map(function (line) {
return line.replace(startOffset, '');
});
data = lines.join('\n');
}
js.push(data); // Collect JavaScript code.
}

@@ -382,2 +406,3 @@

extract: extract,
exit: exit,

@@ -397,3 +422,3 @@ /**

cli.error("Can't find config file: " + fp);
process.exit(1);
exports.exit(1);
}

@@ -413,3 +438,3 @@

cli.error("Can't parse config file: " + fp);
process.exit(1);
exports.exit(1);
}

@@ -483,3 +508,3 @@ },

cli.error("Can't open " + file);
process.exit(1);
exports.exit(1);
}

@@ -551,3 +576,3 @@

cli.error("Can't load reporter file: " + options.reporter);
process.exit(1);
exports.exit(1);
}

@@ -566,15 +591,3 @@ }

// Patch as per https://github.com/visionmedia/mocha/issues/333
// fixes issues with piped output on Windows.
// Root issue is here https://github.com/joyent/node/issues/3584
function exit() { process.exit(passed ? 0 : 2); }
try {
if (exports.getBufferSize()) {
process.stdout.once('drain', exit);
} else {
exit();
}
} catch (err) {
exit();
}
exports.exit(passed ? 0 : 2);
}

@@ -581,0 +594,0 @@

@@ -204,3 +204,3 @@ "use strict";

I001: "Comma warnings can be turned off with 'laxcomma'.",
I002: "Reserved words as properties can be used under the 'es5' option.",
I002: null,
I003: "ES5 option is now set per default"

@@ -207,0 +207,0 @@ };

/*jshint boss: true, rhino: true, unused: true, undef: true, white: true, quotmark: double */
/*global JSHINT */
/*global JSHINT, readFully */

@@ -8,8 +8,10 @@ (function (args) {

var filenames = [];
var flags = {};
var flags = {};
var opts = {};
var globals = {};
var retval = 0;
var readf = (typeof readFully === "function" ? readFully : readFile);
var optstr; // arg1=val1,arg2=val2,...
var predef; // global1=true,global2,global3,...
var opts = {};
var globals = {};
var retval = 0;

@@ -56,3 +58,3 @@ args.forEach(function (arg) {

try {
cfgFileContent = readFile(flags.config);
cfgFileContent = readf(flags.config);
} catch (e) {

@@ -97,3 +99,3 @@ print("Could not read config file " + flags.config);

filenames.forEach(function (name) {
var input = readFile(name);
var input = readf(name);

@@ -100,0 +102,0 @@ if (!input) {

@@ -79,4 +79,4 @@ // Author: Boy Baukema

process.stdout.write(out.join("\n") + "\n");
console.log(out.join("\n"));
}
};

@@ -31,5 +31,5 @@ "use strict";

if (str) {
process.stdout.write(str + "\n" + len + ' error' + ((len === 1) ? '' : 's') + "\n");
console.log(str + "\n" + len + ' error' + ((len === 1) ? '' : 's'));
}
}
};

@@ -55,4 +55,4 @@ module.exports =

process.stdout.write(out.join("\n") + "\n");
console.log(out.join("\n") + "\n");
}
};

@@ -49,5 +49,5 @@ "use strict";

if (str) {
process.stdout.write(str + "\n");
console.log(str + "\n");
}
}
};

@@ -414,2 +414,3 @@ // jshint -W001

help : false,
importClass : false,
importPackage: false,

@@ -419,2 +420,3 @@ "java" : false,

loadClass : false,
Packages : false,
print : false,

@@ -421,0 +423,0 @@ quit : false,

Sorry, the diff of this file is too big to display

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