eslint-linter-browserify 10.4.0 → 10.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/linter.cjs +31 -17
- package/linter.js +31 -17
- package/linter.min.js +2 -2
- package/linter.mjs +31 -17
- package/package.json +3 -3
package/linter.cjs
CHANGED
|
@@ -4216,7 +4216,7 @@ function requireEslintVisitorKeys$2 () {
|
|
|
4216
4216
|
return eslintVisitorKeys$2;
|
|
4217
4217
|
}
|
|
4218
4218
|
|
|
4219
|
-
var version = "10.4.
|
|
4219
|
+
var version = "10.4.1";
|
|
4220
4220
|
var require$$3$1 = {
|
|
4221
4221
|
version: version};
|
|
4222
4222
|
|
|
@@ -12737,11 +12737,12 @@ function requireCodePathState () {
|
|
|
12737
12737
|
}
|
|
12738
12738
|
|
|
12739
12739
|
/**
|
|
12740
|
-
* Makes a code path segment from the first throwable node to the `catch`
|
|
12741
|
-
* block or the `finally` block
|
|
12740
|
+
* Makes a code path segment from the first throwable node in a `try` block to the `catch`
|
|
12741
|
+
* block or the `finally` block or from the first throwable node in a `catch` block
|
|
12742
|
+
* to the `finally` block.
|
|
12742
12743
|
* @returns {void}
|
|
12743
12744
|
*/
|
|
12744
|
-
|
|
12745
|
+
makeFirstThrowablePathInTryOrCatchBlock() {
|
|
12745
12746
|
const forkContext = this.forkContext;
|
|
12746
12747
|
|
|
12747
12748
|
if (!forkContext.reachable) {
|
|
@@ -12750,10 +12751,13 @@ function requireCodePathState () {
|
|
|
12750
12751
|
|
|
12751
12752
|
const context = getThrowContext(this);
|
|
12752
12753
|
|
|
12754
|
+
if (context === this || !context.thrownForkContext.empty) {
|
|
12755
|
+
return;
|
|
12756
|
+
}
|
|
12757
|
+
|
|
12753
12758
|
if (
|
|
12754
|
-
context
|
|
12755
|
-
context.position !== "
|
|
12756
|
-
!context.thrownForkContext.empty
|
|
12759
|
+
context.position !== "try" &&
|
|
12760
|
+
(context.position !== "catch" || !context.hasFinalizer)
|
|
12757
12761
|
) {
|
|
12758
12762
|
return;
|
|
12759
12763
|
}
|
|
@@ -14363,7 +14367,7 @@ function requireCodePathAnalyzer () {
|
|
|
14363
14367
|
|
|
14364
14368
|
case "Identifier":
|
|
14365
14369
|
if (isIdentifierReference(node)) {
|
|
14366
|
-
state.
|
|
14370
|
+
state.makeFirstThrowablePathInTryOrCatchBlock();
|
|
14367
14371
|
dontForward = true;
|
|
14368
14372
|
}
|
|
14369
14373
|
break;
|
|
@@ -14372,7 +14376,7 @@ function requireCodePathAnalyzer () {
|
|
|
14372
14376
|
case "ImportExpression":
|
|
14373
14377
|
case "MemberExpression":
|
|
14374
14378
|
case "NewExpression":
|
|
14375
|
-
state.
|
|
14379
|
+
state.makeFirstThrowablePathInTryOrCatchBlock();
|
|
14376
14380
|
break;
|
|
14377
14381
|
|
|
14378
14382
|
case "YieldExpression":
|
|
@@ -114285,6 +114289,24 @@ function requirePreferArrowCallback () {
|
|
|
114285
114289
|
return;
|
|
114286
114290
|
}
|
|
114287
114291
|
|
|
114292
|
+
const functionToken = sourceCode.getFirstToken(
|
|
114293
|
+
node,
|
|
114294
|
+
node.async ? 1 : 0,
|
|
114295
|
+
);
|
|
114296
|
+
const leftParenToken = sourceCode.getTokenAfter(
|
|
114297
|
+
functionToken,
|
|
114298
|
+
astUtils.isOpeningParenToken,
|
|
114299
|
+
);
|
|
114300
|
+
|
|
114301
|
+
if (node.async) {
|
|
114302
|
+
if (
|
|
114303
|
+
functionToken.loc.end.line <
|
|
114304
|
+
leftParenToken.loc.start.line
|
|
114305
|
+
) {
|
|
114306
|
+
return;
|
|
114307
|
+
}
|
|
114308
|
+
}
|
|
114309
|
+
|
|
114288
114310
|
// Remove `.bind(this)` if exists.
|
|
114289
114311
|
if (callbackInfo.isLexicalThis) {
|
|
114290
114312
|
const memberNode = node.parent;
|
|
@@ -114337,14 +114359,6 @@ function requirePreferArrowCallback () {
|
|
|
114337
114359
|
}
|
|
114338
114360
|
|
|
114339
114361
|
// Convert the function expression to an arrow function.
|
|
114340
|
-
const functionToken = sourceCode.getFirstToken(
|
|
114341
|
-
node,
|
|
114342
|
-
node.async ? 1 : 0,
|
|
114343
|
-
);
|
|
114344
|
-
const leftParenToken = sourceCode.getTokenAfter(
|
|
114345
|
-
functionToken,
|
|
114346
|
-
astUtils.isOpeningParenToken,
|
|
114347
|
-
);
|
|
114348
114362
|
const tokenBeforeBody = sourceCode.getTokenBefore(
|
|
114349
114363
|
node.body,
|
|
114350
114364
|
);
|
package/linter.js
CHANGED
|
@@ -4218,7 +4218,7 @@
|
|
|
4218
4218
|
return eslintVisitorKeys$2;
|
|
4219
4219
|
}
|
|
4220
4220
|
|
|
4221
|
-
var version = "10.4.
|
|
4221
|
+
var version = "10.4.1";
|
|
4222
4222
|
var require$$3$1 = {
|
|
4223
4223
|
version: version};
|
|
4224
4224
|
|
|
@@ -12739,11 +12739,12 @@
|
|
|
12739
12739
|
}
|
|
12740
12740
|
|
|
12741
12741
|
/**
|
|
12742
|
-
* Makes a code path segment from the first throwable node to the `catch`
|
|
12743
|
-
* block or the `finally` block
|
|
12742
|
+
* Makes a code path segment from the first throwable node in a `try` block to the `catch`
|
|
12743
|
+
* block or the `finally` block or from the first throwable node in a `catch` block
|
|
12744
|
+
* to the `finally` block.
|
|
12744
12745
|
* @returns {void}
|
|
12745
12746
|
*/
|
|
12746
|
-
|
|
12747
|
+
makeFirstThrowablePathInTryOrCatchBlock() {
|
|
12747
12748
|
const forkContext = this.forkContext;
|
|
12748
12749
|
|
|
12749
12750
|
if (!forkContext.reachable) {
|
|
@@ -12752,10 +12753,13 @@
|
|
|
12752
12753
|
|
|
12753
12754
|
const context = getThrowContext(this);
|
|
12754
12755
|
|
|
12756
|
+
if (context === this || !context.thrownForkContext.empty) {
|
|
12757
|
+
return;
|
|
12758
|
+
}
|
|
12759
|
+
|
|
12755
12760
|
if (
|
|
12756
|
-
context
|
|
12757
|
-
context.position !== "
|
|
12758
|
-
!context.thrownForkContext.empty
|
|
12761
|
+
context.position !== "try" &&
|
|
12762
|
+
(context.position !== "catch" || !context.hasFinalizer)
|
|
12759
12763
|
) {
|
|
12760
12764
|
return;
|
|
12761
12765
|
}
|
|
@@ -14365,7 +14369,7 @@
|
|
|
14365
14369
|
|
|
14366
14370
|
case "Identifier":
|
|
14367
14371
|
if (isIdentifierReference(node)) {
|
|
14368
|
-
state.
|
|
14372
|
+
state.makeFirstThrowablePathInTryOrCatchBlock();
|
|
14369
14373
|
dontForward = true;
|
|
14370
14374
|
}
|
|
14371
14375
|
break;
|
|
@@ -14374,7 +14378,7 @@
|
|
|
14374
14378
|
case "ImportExpression":
|
|
14375
14379
|
case "MemberExpression":
|
|
14376
14380
|
case "NewExpression":
|
|
14377
|
-
state.
|
|
14381
|
+
state.makeFirstThrowablePathInTryOrCatchBlock();
|
|
14378
14382
|
break;
|
|
14379
14383
|
|
|
14380
14384
|
case "YieldExpression":
|
|
@@ -114287,6 +114291,24 @@
|
|
|
114287
114291
|
return;
|
|
114288
114292
|
}
|
|
114289
114293
|
|
|
114294
|
+
const functionToken = sourceCode.getFirstToken(
|
|
114295
|
+
node,
|
|
114296
|
+
node.async ? 1 : 0,
|
|
114297
|
+
);
|
|
114298
|
+
const leftParenToken = sourceCode.getTokenAfter(
|
|
114299
|
+
functionToken,
|
|
114300
|
+
astUtils.isOpeningParenToken,
|
|
114301
|
+
);
|
|
114302
|
+
|
|
114303
|
+
if (node.async) {
|
|
114304
|
+
if (
|
|
114305
|
+
functionToken.loc.end.line <
|
|
114306
|
+
leftParenToken.loc.start.line
|
|
114307
|
+
) {
|
|
114308
|
+
return;
|
|
114309
|
+
}
|
|
114310
|
+
}
|
|
114311
|
+
|
|
114290
114312
|
// Remove `.bind(this)` if exists.
|
|
114291
114313
|
if (callbackInfo.isLexicalThis) {
|
|
114292
114314
|
const memberNode = node.parent;
|
|
@@ -114339,14 +114361,6 @@
|
|
|
114339
114361
|
}
|
|
114340
114362
|
|
|
114341
114363
|
// Convert the function expression to an arrow function.
|
|
114342
|
-
const functionToken = sourceCode.getFirstToken(
|
|
114343
|
-
node,
|
|
114344
|
-
node.async ? 1 : 0,
|
|
114345
|
-
);
|
|
114346
|
-
const leftParenToken = sourceCode.getTokenAfter(
|
|
114347
|
-
functionToken,
|
|
114348
|
-
astUtils.isOpeningParenToken,
|
|
114349
|
-
);
|
|
114350
114364
|
const tokenBeforeBody = sourceCode.getTokenBefore(
|
|
114351
114365
|
node.body,
|
|
114352
114366
|
);
|