New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.5.6 to 2.5.7

7

package.json
{
"name": "jshint",
"version": "2.5.6",
"version": "2.5.7",
"homepage": "http://jshint.com/",

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

"jshint": "2.5.x",
"browserify": "5.x",
"browserify": "6.x",
"coveraje": "0.2.x",

@@ -54,3 +54,4 @@ "nodeunit": "0.9.x",

"unicode-6.3.0": "0.1.x",
"regenerate": "0.6.x"
"regenerate": "0.6.x",
"mock-stdin": "^0.3.0"
},

@@ -57,0 +58,0 @@

@@ -599,4 +599,13 @@ "use strict";

var config = opts.config;
if (opts.filename && !config) {
var filename = path.resolve(opts.filename);
var filename;
// There is an if(filename) check in the lint() function called below.
// passing a filename of undefined is the same as calling the function
// without a filename. If there is no opts.filename, filename remains
// undefined and lint() is effectively called with 4 parameters.
if (opts.filename) {
filename = path.resolve(opts.filename);
}
if (filename && !config) {
config = loadNpmConfig(filename) ||

@@ -608,3 +617,3 @@ exports.loadConfig(findConfig(filename));

lint(extract(code, opts.extract), results, config, data);
lint(extract(code, opts.extract), results, config, data, filename);
(opts.reporter || defReporter)(results, data, { verbose: opts.verbose });

@@ -611,0 +620,0 @@ cb(results.length === 0);

@@ -541,3 +541,3 @@ /*

var readUnicodeEscapeSequence = function () {
var readUnicodeEscapeSequence = function() {
/*jshint validthis:true */

@@ -622,2 +622,8 @@ index += 1;

function removeEscapeSequences(id) {
return id.replace(/\\u([0-9a-fA-F]{4})/g, function(m0, codepoint) {
return String.fromCharCode(parseInt(codepoint, 16));
});
}
char = getIdentifierStart();

@@ -653,3 +659,5 @@ if (char === null) {

type: type,
value: id
value: removeEscapeSequences(id),
text: id,
tokenLength: id.length
};

@@ -912,5 +920,7 @@ },

} else if (ch === '\\') {
// TODO: Parse escape sequence, warn about invalid escae sequences
// TODO: Parse escape sequence, warn about invalid escape sequences
value += ch;
this.skip(1);
} else if (ch === '`') {
break;
} else {

@@ -1373,3 +1383,3 @@ // Otherwise, append the value and continue.

if (match) {
this.skip(match.value.length);
this.skip(match.tokenLength || match.value.length);
return match;

@@ -1498,3 +1508,3 @@ }

// Produce a token object.
var create = function (type, value, isProperty) {
var create = function (type, value, isProperty, token) {
/*jshint validthis:true */

@@ -1550,2 +1560,3 @@ var obj;

obj.from = this.from;
if (obj.identifier && token) obj.raw_text = token.text || token.value;

@@ -1629,2 +1640,3 @@ if (isProperty && obj.identifier) {

name: token.value,
raw_name: token.text,
isProperty: state.tokens.curr.id === "."

@@ -1637,3 +1649,3 @@ });

case Token.BooleanLiteral:
return create("(identifier)", token.value, state.tokens.curr.id === ".");
return create("(identifier)", token.value, state.tokens.curr.id === ".", token);

@@ -1640,0 +1652,0 @@ case Token.NumericLiteral:

@@ -70,3 +70,4 @@ "use strict";

E051: "Regular parameters cannot come after default parameters.",
E052: "Unclosed template literal."
E052: "Unclosed template literal.",
E053: "Export declaration must be in global scope."
};

@@ -73,0 +74,0 @@

@@ -54,3 +54,6 @@ // jshint -W001

Proxy : false,
Promise : false
Promise : false,
Reflect : false,
Symbol : false,
System : false
};

@@ -72,2 +75,3 @@

CanvasRenderingContext2D: false,
CSS : false,
clearInterval : false,

@@ -343,2 +347,4 @@ clearTimeout : false,

SVGZoomAndPan : false,
TextDecoder : false,
TextEncoder : false,
TimeEvent : false,

@@ -345,0 +351,0 @@ top : false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

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

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