Skip to content

Commit 5608b03

Browse files
committed
v2.13.2
1 parent 043f98a commit 5608b03

File tree

4 files changed

+79
-45
lines changed

4 files changed

+79
-45
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
<a name="2.13.2"></a>
2+
## [2.13.2](https://github.com/jshint/jshint/compare/2.13.1...v2.13.2) (2021-12-27)
3+
4+
### Bug Fixes
5+
6+
* Add missing well-known globals (#3582) ([cc1adf6](https://github.com/jshint/jshint/commit/cc1adf6))
7+
* add URL for node in src/vars.js (#3570) ([ca06e6a](https://github.com/jshint/jshint/commit/ca06e6a))
8+
* change escape-sequence handler for double quotes (\") (#3566) ([75e48b7](https://github.com/jshint/jshint/commit/75e48b7))
9+
* Limit "Too many Errors" (E043) to errors only (#3562) ([4a681b9](https://github.com/jshint/jshint/commit/4a681b9))
10+
* Tolerate keyword in object shorthand ([057b1c6](https://github.com/jshint/jshint/commit/057b1c6))
11+
* Tolerate unterminated nullish coalescing ([ecae54a](https://github.com/jshint/jshint/commit/ecae54a))
12+
113
<a name="2.13.1"></a>
214
## [2.13.1](https://github.com/jshint/jshint/compare/2.13.0...v2.13.1) (2021-08-10)
315

dist/jshint-rhino.js

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env rhino
22
var window = {};
3-
/*! 2.13.1 */
3+
/*! 2.13.2 */
44
var JSHINT;
55
if (typeof window === 'undefined') window = {};
66
(function () {
@@ -19774,9 +19774,6 @@ Lexer.prototype = {
1977419774
case "\\":
1977519775
char = "\\\\";
1977619776
break;
19777-
case "\"":
19778-
char = "\\\"";
19779-
break;
1978019777
case "/":
1978119778
break;
1978219779
case "":
@@ -22158,7 +22155,7 @@ exports.val = {
2215822155
indent : false,
2215922156

2216022157
/**
22161-
* This options allows you to set the maximum amount of warnings JSHint will
22158+
* This options allows you to set the maximum amount of errors JSHint will
2216222159
* produce before giving up. Default is 50.
2216322160
*/
2216422161
maxerr : false,
@@ -24573,6 +24570,9 @@ exports.ecmaIdentifiers = {
2457324570
8: {
2457424571
Atomics : false,
2457524572
SharedArrayBuffer : false
24573+
},
24574+
11: {
24575+
BigInt : false
2457624576
}
2457724577
};
2457824578

@@ -24926,6 +24926,7 @@ exports.browser = {
2492624926
TimeEvent : false,
2492724927
top : false,
2492824928
URL : false,
24929+
URLSearchParams : false,
2492924930
WebGLActiveInfo : false,
2493024931
WebGLBuffer : false,
2493124932
WebGLContextEvent : false,
@@ -25012,20 +25013,23 @@ exports.node = {
2501225013
global : false,
2501325014
module : false,
2501425015
require : false,
25016+
Intl : false,
2501525017

2501625018
// These globals are writeable because Node allows the following
2501725019
// usage pattern: var Buffer = require("buffer").Buffer;
2501825020

25019-
Buffer : true,
25020-
console : true,
25021-
exports : true,
25022-
process : true,
25023-
setTimeout : true,
25024-
clearTimeout : true,
25025-
setInterval : true,
25026-
clearInterval : true,
25027-
setImmediate : true, // v0.9.1+
25028-
clearImmediate: true // v0.9.1+
25021+
Buffer : true,
25022+
console : true,
25023+
exports : true,
25024+
process : true,
25025+
setTimeout : true,
25026+
clearTimeout : true,
25027+
setInterval : true,
25028+
clearInterval : true,
25029+
setImmediate : true, // v0.9.1+
25030+
clearImmediate : true, // v0.9.1+
25031+
URL : true, // v6.13.0+
25032+
URLSearchParams: true // v6.13.0+
2502925033
};
2503025034

2503125035
exports.browserify = {
@@ -25267,10 +25271,12 @@ exports.mocha = {
2526725271
// BDD
2526825272
describe : false,
2526925273
xdescribe : false,
25270-
it : false,
25271-
xit : false,
2527225274
context : false,
2527325275
xcontext : false,
25276+
it : false,
25277+
xit : false,
25278+
specify : false,
25279+
xspecify : false,
2527425280
before : false,
2527525281
after : false,
2527625282
beforeEach : false,
@@ -25737,9 +25743,10 @@ var JSHINT = (function() {
2573725743

2573825744
removeIgnoredMessages();
2573925745

25740-
if (JSHINT.errors.length >= state.option.maxerr)
25746+
var errors = JSHINT.errors.filter(function(e) { return /E\d{3}/.test(e.code); });
25747+
if (errors.length >= state.option.maxerr) {
2574125748
quit("E043", t);
25742-
25749+
}
2574325750
return w;
2574425751
}
2574525752

@@ -27764,7 +27771,9 @@ var JSHINT = (function() {
2776427771
that.left = left;
2776527772
var right = that.right = expression(context, 39);
2776627773

27767-
if (!right.paren && (right.id === "||" || right.id === "&&")) {
27774+
if (!right) {
27775+
error("E024", state.tokens.next, state.tokens.next.id);
27776+
} else if (!right.paren && (right.id === "||" || right.id === "&&")) {
2776827777
error("E024", that.right, that.right.id);
2776927778
}
2777027779

@@ -29386,8 +29395,10 @@ var JSHINT = (function() {
2938629395
warning("W104", state.tokens.next, "object short notation", "6");
2938729396
}
2938829397
t = expression(context, 10);
29389-
i = t.value;
29390-
saveProperty(props, i, t);
29398+
i = t && t.value;
29399+
if (t) {
29400+
saveProperty(props, i, t);
29401+
}
2939129402

2939229403
} else if (peek().id !== ":" && (nextVal === "get" || nextVal === "set")) {
2939329404
advance(nextVal);

dist/jshint.js

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! 2.13.1 */
1+
/*! 2.13.2 */
22
var JSHINT;
33
if (typeof window === 'undefined') window = {};
44
(function () {
@@ -19772,9 +19772,6 @@ Lexer.prototype = {
1977219772
case "\\":
1977319773
char = "\\\\";
1977419774
break;
19775-
case "\"":
19776-
char = "\\\"";
19777-
break;
1977819775
case "/":
1977919776
break;
1978019777
case "":
@@ -22156,7 +22153,7 @@ exports.val = {
2215622153
indent : false,
2215722154

2215822155
/**
22159-
* This options allows you to set the maximum amount of warnings JSHint will
22156+
* This options allows you to set the maximum amount of errors JSHint will
2216022157
* produce before giving up. Default is 50.
2216122158
*/
2216222159
maxerr : false,
@@ -24571,6 +24568,9 @@ exports.ecmaIdentifiers = {
2457124568
8: {
2457224569
Atomics : false,
2457324570
SharedArrayBuffer : false
24571+
},
24572+
11: {
24573+
BigInt : false
2457424574
}
2457524575
};
2457624576

@@ -24924,6 +24924,7 @@ exports.browser = {
2492424924
TimeEvent : false,
2492524925
top : false,
2492624926
URL : false,
24927+
URLSearchParams : false,
2492724928
WebGLActiveInfo : false,
2492824929
WebGLBuffer : false,
2492924930
WebGLContextEvent : false,
@@ -25010,20 +25011,23 @@ exports.node = {
2501025011
global : false,
2501125012
module : false,
2501225013
require : false,
25014+
Intl : false,
2501325015

2501425016
// These globals are writeable because Node allows the following
2501525017
// usage pattern: var Buffer = require("buffer").Buffer;
2501625018

25017-
Buffer : true,
25018-
console : true,
25019-
exports : true,
25020-
process : true,
25021-
setTimeout : true,
25022-
clearTimeout : true,
25023-
setInterval : true,
25024-
clearInterval : true,
25025-
setImmediate : true, // v0.9.1+
25026-
clearImmediate: true // v0.9.1+
25019+
Buffer : true,
25020+
console : true,
25021+
exports : true,
25022+
process : true,
25023+
setTimeout : true,
25024+
clearTimeout : true,
25025+
setInterval : true,
25026+
clearInterval : true,
25027+
setImmediate : true, // v0.9.1+
25028+
clearImmediate : true, // v0.9.1+
25029+
URL : true, // v6.13.0+
25030+
URLSearchParams: true // v6.13.0+
2502725031
};
2502825032

2502925033
exports.browserify = {
@@ -25265,10 +25269,12 @@ exports.mocha = {
2526525269
// BDD
2526625270
describe : false,
2526725271
xdescribe : false,
25268-
it : false,
25269-
xit : false,
2527025272
context : false,
2527125273
xcontext : false,
25274+
it : false,
25275+
xit : false,
25276+
specify : false,
25277+
xspecify : false,
2527225278
before : false,
2527325279
after : false,
2527425280
beforeEach : false,
@@ -25735,9 +25741,10 @@ var JSHINT = (function() {
2573525741

2573625742
removeIgnoredMessages();
2573725743

25738-
if (JSHINT.errors.length >= state.option.maxerr)
25744+
var errors = JSHINT.errors.filter(function(e) { return /E\d{3}/.test(e.code); });
25745+
if (errors.length >= state.option.maxerr) {
2573925746
quit("E043", t);
25740-
25747+
}
2574125748
return w;
2574225749
}
2574325750

@@ -27762,7 +27769,9 @@ var JSHINT = (function() {
2776227769
that.left = left;
2776327770
var right = that.right = expression(context, 39);
2776427771

27765-
if (!right.paren && (right.id === "||" || right.id === "&&")) {
27772+
if (!right) {
27773+
error("E024", state.tokens.next, state.tokens.next.id);
27774+
} else if (!right.paren && (right.id === "||" || right.id === "&&")) {
2776627775
error("E024", that.right, that.right.id);
2776727776
}
2776827777

@@ -29384,8 +29393,10 @@ var JSHINT = (function() {
2938429393
warning("W104", state.tokens.next, "object short notation", "6");
2938529394
}
2938629395
t = expression(context, 10);
29387-
i = t.value;
29388-
saveProperty(props, i, t);
29396+
i = t && t.value;
29397+
if (t) {
29398+
saveProperty(props, i, t);
29399+
}
2938929400

2939029401
} else if (peek().id !== ":" && (nextVal === "get" || nextVal === "set")) {
2939129402
advance(nextVal);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jshint",
3-
"version": "2.13.1",
3+
"version": "2.13.2",
44
"homepage": "http://jshint.com/",
55
"description": "Static analysis tool for JavaScript",
66
"author": {

0 commit comments

Comments
 (0)