generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.24.1 to 8.25.0 in the eslint group #995
Merged
github-actions
merged 1 commit into
main
from
dependabot/npm_and_yarn/eslint-f442c6aa45
Feb 24, 2025
Merged
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.24.1 to 8.25.0 in the eslint group #995
github-actions
merged 1 commit into
main
from
dependabot/npm_and_yarn/eslint-f442c6aa45
Feb 24, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumps the eslint group with 1 update: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin). Updates `@typescript-eslint/eslint-plugin` from 8.24.1 to 8.25.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.25.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] <[email protected]>
Diff between @typescript-eslint/eslint-plugin 8.24.1 and 8.25.0diff --git a/dist/rules/adjacent-overload-signatures.js b/dist/rules/adjacent-overload-signatures.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/adjacent-overload-signatures.js
+++ b/dist/rules/adjacent-overload-signatures.js
@@ -123,3 +123,2 @@
},
});
-//# sourceMappingURL=adjacent-overload-signatures.js.map
\ No newline at end of file
diff --git a/dist/configs/all.js b/dist/configs/all.js
index v8.24.1..v8.25.0 100644
--- a/dist/configs/all.js
+++ b/dist/configs/all.js
@@ -160,3 +160,2 @@
},
};
-//# sourceMappingURL=all.js.map
\ No newline at end of file
diff --git a/dist/rules/prefer-optional-chain-utils/analyzeChain.js b/dist/rules/prefer-optional-chain-utils/analyzeChain.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/prefer-optional-chain-utils/analyzeChain.js
+++ b/dist/rules/prefer-optional-chain-utils/analyzeChain.js
@@ -41,4 +41,5 @@
const checkNullishAndReport_1 = require("./checkNullishAndReport");
const compareNodes_1 = require("./compareNodes");
+const gatherLogicalOperands_1 = require("./gatherLogicalOperands");
function includesType(parserServices, node, typeFlagIn) {
const typeFlag = typeFlagIn | ts.TypeFlags.Any | ts.TypeFlags.Unknown;
@@ -53,8 +54,8 @@
const analyzeAndChainOperand = (parserServices, operand, index, chain) => {
switch (operand.comparisonType) {
- case "Boolean" /* NullishComparisonType.Boolean */: {
+ case gatherLogicalOperands_1.NullishComparisonType.Boolean: {
const nextOperand = chain.at(index + 1);
if (nextOperand?.comparisonType ===
- "NotStrictEqualNull" /* NullishComparisonType.NotStrictEqualNull */ &&
+ gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualNull &&
operand.comparedName.type === utils_1.AST_NODE_TYPES.Identifier) {
return null;
@@ -62,13 +63,13 @@
return [operand];
}
- case "NotEqualNullOrUndefined" /* NullishComparisonType.NotEqualNullOrUndefined */:
+ case gatherLogicalOperands_1.NullishComparisonType.NotEqualNullOrUndefined:
return [operand];
- case "NotStrictEqualNull" /* NullishComparisonType.NotStrictEqualNull */: {
+ case gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualNull: {
// handle `x !== null && x !== undefined`
const nextOperand = chain.at(index + 1);
if (nextOperand?.comparisonType ===
- "NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */ &&
+ gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualUndefined &&
(0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) ===
- "Equal" /* NodeComparisonResult.Equal */) {
+ compareNodes_1.NodeComparisonResult.Equal) {
return [operand, nextOperand];
}
@@ -81,11 +82,11 @@
return [operand];
}
- case "NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */: {
+ case gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualUndefined: {
// handle `x !== undefined && x !== null`
const nextOperand = chain.at(index + 1);
if (nextOperand?.comparisonType ===
- "NotStrictEqualNull" /* NullishComparisonType.NotStrictEqualNull */ &&
+ gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualNull &&
(0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) ===
- "Equal" /* NodeComparisonResult.Equal */) {
+ compareNodes_1.NodeComparisonResult.Equal) {
return [operand, nextOperand];
}
@@ -104,14 +105,14 @@
const analyzeOrChainOperand = (parserServices, operand, index, chain) => {
switch (operand.comparisonType) {
- case "NotBoolean" /* NullishComparisonType.NotBoolean */:
- case "EqualNullOrUndefined" /* NullishComparisonType.EqualNullOrUndefined */:
+ case gatherLogicalOperands_1.NullishComparisonType.NotBoolean:
+ case gatherLogicalOperands_1.NullishComparisonType.EqualNullOrUndefined:
return [operand];
- case "StrictEqualNull" /* NullishComparisonType.StrictEqualNull */: {
+ case gatherLogicalOperands_1.NullishComparisonType.StrictEqualNull: {
// handle `x === null || x === undefined`
const nextOperand = chain.at(index + 1);
if (nextOperand?.comparisonType ===
- "StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */ &&
+ gatherLogicalOperands_1.NullishComparisonType.StrictEqualUndefined &&
(0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) ===
- "Equal" /* NodeComparisonResult.Equal */) {
+ compareNodes_1.NodeComparisonResult.Equal) {
return [operand, nextOperand];
}
@@ -124,10 +125,10 @@
return [operand];
}
- case "StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */: {
+ case gatherLogicalOperands_1.NullishComparisonType.StrictEqualUndefined: {
// handle `x === undefined || x === null`
const nextOperand = chain.at(index + 1);
- if (nextOperand?.comparisonType === "StrictEqualNull" /* NullishComparisonType.StrictEqualNull */ &&
+ if (nextOperand?.comparisonType === gatherLogicalOperands_1.NullishComparisonType.StrictEqualNull &&
(0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) ===
- "Equal" /* NodeComparisonResult.Equal */) {
+ compareNodes_1.NodeComparisonResult.Equal) {
return [operand, nextOperand];
}
@@ -184,12 +185,12 @@
// `undefined`, or else we're going to change the final type - which is
// unsafe and might cause downstream type errors.
- else if (lastOperand.comparisonType === "EqualNullOrUndefined" /* NullishComparisonType.EqualNullOrUndefined */ ||
+ else if (lastOperand.comparisonType === gatherLogicalOperands_1.NullishComparisonType.EqualNullOrUndefined ||
lastOperand.comparisonType ===
- "NotEqualNullOrUndefined" /* NullishComparisonType.NotEqualNullOrUndefined */ ||
- lastOperand.comparisonType === "StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */ ||
+ gatherLogicalOperands_1.NullishComparisonType.NotEqualNullOrUndefined ||
+ lastOperand.comparisonType === gatherLogicalOperands_1.NullishComparisonType.StrictEqualUndefined ||
lastOperand.comparisonType ===
- "NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */ ||
+ gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualUndefined ||
(operator === '||' &&
- lastOperand.comparisonType === "NotBoolean" /* NullishComparisonType.NotBoolean */)) {
+ lastOperand.comparisonType === gatherLogicalOperands_1.NullishComparisonType.NotBoolean)) {
// we know the last operand is an equality check - so the change in types
// DOES NOT matter and will not change the runtime result or cause a type
@@ -305,5 +306,5 @@
newCode = `${left} ${operator} ${right}`;
}
- else if (lastOperand.comparisonType === "NotBoolean" /* NullishComparisonType.NotBoolean */) {
+ else if (lastOperand.comparisonType === gatherLogicalOperands_1.NullishComparisonType.NotBoolean) {
newCode = `!${newCode}`;
}
@@ -445,9 +446,9 @@
// foo !== null && foo !== undefined
validatedOperands[validatedOperands.length - 1].comparedName);
- if (comparisonResult === "Subset" /* NodeComparisonResult.Subset */) {
+ if (comparisonResult === compareNodes_1.NodeComparisonResult.Subset) {
// the operands are comparable, so we can continue searching
subChain.push(currentOperand);
}
- else if (comparisonResult === "Invalid" /* NodeComparisonResult.Invalid */) {
+ else if (comparisonResult === compareNodes_1.NodeComparisonResult.Invalid) {
maybeReportThenReset(validatedOperands);
}
@@ -465,3 +466,2 @@
maybeReportThenReset();
}
-//# sourceMappingURL=analyzeChain.js.map
\ No newline at end of file
diff --git a/dist/rules/array-type.js b/dist/rules/array-type.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/array-type.js
+++ b/dist/rules/array-type.js
@@ -231,3 +231,2 @@
},
});
-//# sourceMappingURL=array-type.js.map
\ No newline at end of file
diff --git a/dist/util/assertionFunctionUtils.js b/dist/util/assertionFunctionUtils.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/assertionFunctionUtils.js
+++ b/dist/util/assertionFunctionUtils.js
@@ -117,3 +117,2 @@
};
}
-//# sourceMappingURL=assertionFunctionUtils.js.map
\ No newline at end of file
diff --git a/dist/util/astUtils.js b/dist/util/astUtils.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/astUtils.js
+++ b/dist/util/astUtils.js
@@ -96,3 +96,2 @@
}
}
-//# sourceMappingURL=astUtils.js.map
\ No newline at end of file
diff --git a/dist/rules/await-thenable.js b/dist/rules/await-thenable.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/await-thenable.js
+++ b/dist/rules/await-thenable.js
@@ -145,3 +145,2 @@
},
});
-//# sourceMappingURL=await-thenable.js.map
\ No newline at end of file
diff --git a/dist/rules/ban-ts-comment.js b/dist/rules/ban-ts-comment.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/ban-ts-comment.js
+++ b/dist/rules/ban-ts-comment.js
@@ -183,3 +183,2 @@
},
});
-//# sourceMappingURL=ban-ts-comment.js.map
\ No newline at end of file
diff --git a/dist/rules/ban-tslint-comment.js b/dist/rules/ban-tslint-comment.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/ban-tslint-comment.js
+++ b/dist/rules/ban-tslint-comment.js
@@ -52,3 +52,2 @@
},
});
-//# sourceMappingURL=ban-tslint-comment.js.map
\ No newline at end of file
diff --git a/dist/configs/base.js b/dist/configs/base.js
index v8.24.1..v8.25.0 100644
--- a/dist/configs/base.js
+++ b/dist/configs/base.js
@@ -5,3 +5,2 @@
plugins: ['@typescript-eslint'],
};
-//# sourceMappingURL=base.js.map
\ No newline at end of file
diff --git a/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js b/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js
+++ b/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js
@@ -44,3 +44,2 @@
}
}
-//# sourceMappingURL=checkNullishAndReport.js.map
\ No newline at end of file
diff --git a/dist/rules/class-literal-property-style.js b/dist/rules/class-literal-property-style.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/class-literal-property-style.js
+++ b/dist/rules/class-literal-property-style.js
@@ -159,3 +159,2 @@
},
});
-//# sourceMappingURL=class-literal-property-style.js.map
\ No newline at end of file
diff --git a/dist/rules/class-methods-use-this.js b/dist/rules/class-methods-use-this.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/class-methods-use-this.js
+++ b/dist/rules/class-methods-use-this.js
@@ -219,3 +219,2 @@
},
});
-//# sourceMappingURL=class-methods-use-this.js.map
\ No newline at end of file
diff --git a/dist/util/collectUnusedVariables.js b/dist/util/collectUnusedVariables.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/collectUnusedVariables.js
+++ b/dist/util/collectUnusedVariables.js
@@ -603,3 +603,2 @@
return UnusedVarsVisitor.collectUnusedVariables(context.sourceCode.ast, utils_1.ESLintUtils.nullThrows(context.sourceCode.scopeManager, 'Missing required scope manager'));
}
-//# sourceMappingURL=collectUnusedVariables.js.map
\ No newline at end of file
diff --git a/dist/rules/prefer-optional-chain-utils/compareNodes.js b/dist/rules/prefer-optional-chain-utils/compareNodes.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/prefer-optional-chain-utils/compareNodes.js
+++ b/dist/rules/prefer-optional-chain-utils/compareNodes.js
@@ -1,10 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+exports.NodeComparisonResult = void 0;
exports.compareNodes = compareNodes;
const utils_1 = require("@typescript-eslint/utils");
const visitor_keys_1 = require("@typescript-eslint/visitor-keys");
+var NodeComparisonResult;
+(function (NodeComparisonResult) {
+ /** the two nodes are comparably the same */
+ NodeComparisonResult["Equal"] = "Equal";
+ /** the left node is a subset of the right node */
+ NodeComparisonResult["Subset"] = "Subset";
+ /** the left node is not the same or is a superset of the right node */
+ NodeComparisonResult["Invalid"] = "Invalid";
+})(NodeComparisonResult || (exports.NodeComparisonResult = NodeComparisonResult = {}));
function compareArrays(arrayA, arrayB) {
if (arrayA.length !== arrayB.length) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
const result = arrayA.every((elA, idx) => {
@@ -13,10 +23,10 @@
return elA === elB;
}
- return compareUnknownValues(elA, elB) === "Equal" /* NodeComparisonResult.Equal */;
+ return compareUnknownValues(elA, elB) === NodeComparisonResult.Equal;
});
if (result) {
- return "Equal" /* NodeComparisonResult.Equal */;
+ return NodeComparisonResult.Equal;
}
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
function isValidNode(x) {
@@ -37,11 +47,11 @@
if (valueA == null || valueB == null) {
if (valueA !== valueB) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
- return "Equal" /* NodeComparisonResult.Equal */;
+ return NodeComparisonResult.Equal;
}
/* istanbul ignore if -- not possible for us to test this - it's just a sanity safeguard */
if (!isValidNode(valueA) || !isValidNode(valueB)) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
return compareNodes(valueA, valueB);
@@ -52,9 +62,9 @@
if (currentVisitorKeys == null) {
// we don't know how to visit this node, so assume it's invalid to avoid false-positives / broken fixers
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
if (currentVisitorKeys.length === 0) {
// assume nodes with no keys are constant things like keywords
- return "Equal" /* NodeComparisonResult.Equal */;
+ return NodeComparisonResult.Equal;
}
for (const key of currentVisitorKeys) {
@@ -67,6 +77,6 @@
const arrayB = nodeBChildOrChildren;
const result = compareArrays(arrayA, arrayB);
- if (result !== "Equal" /* NodeComparisonResult.Equal */) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ if (result !== NodeComparisonResult.Equal) {
+ return NodeComparisonResult.Invalid;
}
// fallthrough to the next key as the key was "equal"
@@ -74,11 +84,11 @@
else {
const result = compareUnknownValues(nodeAChildOrChildren, nodeBChildOrChildren);
- if (result !== "Equal" /* NodeComparisonResult.Equal */) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ if (result !== NodeComparisonResult.Equal) {
+ return NodeComparisonResult.Invalid;
}
// fallthrough to the next key as the key was "equal"
}
}
- return "Equal" /* NodeComparisonResult.Equal */;
+ return NodeComparisonResult.Equal;
}
function compareNodesUncached(nodeA, nodeB) {
@@ -134,20 +144,20 @@
// Private identifiers in optional chaining is not currently allowed
// TODO - handle this once TS supports it (https://github.com/microsoft/TypeScript/issues/42734)
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
- if (compareNodes(nodeA, nodeB.object) !== "Invalid" /* NodeComparisonResult.Invalid */) {
- return "Subset" /* NodeComparisonResult.Subset */;
+ if (compareNodes(nodeA, nodeB.object) !== NodeComparisonResult.Invalid) {
+ return NodeComparisonResult.Subset;
}
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
case utils_1.AST_NODE_TYPES.CallExpression:
- if (compareNodes(nodeA, nodeB.callee) !== "Invalid" /* NodeComparisonResult.Invalid */) {
- return "Subset" /* NodeComparisonResult.Subset */;
+ if (compareNodes(nodeA, nodeB.callee) !== NodeComparisonResult.Invalid) {
+ return NodeComparisonResult.Subset;
}
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
default:
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
}
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
switch (nodeA.type) {
@@ -161,8 +171,8 @@
case utils_1.AST_NODE_TYPES.NewExpression:
case utils_1.AST_NODE_TYPES.ObjectExpression:
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
// chaining from assignments could change the value irrevocably - so it makes no sense to compare the chain
case utils_1.AST_NODE_TYPES.AssignmentExpression:
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
case utils_1.AST_NODE_TYPES.CallExpression: {
const nodeBCall = nodeB;
@@ -173,10 +183,10 @@
// we don't want to check the arguments in this case
const aSubsetOfB = compareNodes(nodeA, nodeBCall.callee);
- if (aSubsetOfB !== "Invalid" /* NodeComparisonResult.Invalid */) {
- return "Subset" /* NodeComparisonResult.Subset */;
+ if (aSubsetOfB !== NodeComparisonResult.Invalid) {
+ return NodeComparisonResult.Subset;
}
const calleeCompare = compareNodes(nodeA.callee, nodeBCall.callee);
- if (calleeCompare !== "Equal" /* NodeComparisonResult.Equal */) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ if (calleeCompare !== NodeComparisonResult.Equal) {
+ return NodeComparisonResult.Invalid;
}
// NOTE - we purposely ignore optional flag because for our purposes
@@ -186,12 +196,12 @@
// are going to be exactly the same
const argumentCompare = compareArrays(nodeA.arguments, nodeBCall.arguments);
- if (argumentCompare !== "Equal" /* NodeComparisonResult.Equal */) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ if (argumentCompare !== NodeComparisonResult.Equal) {
+ return NodeComparisonResult.Invalid;
}
const typeParamCompare = compareNodes(nodeA.typeArguments, nodeBCall.typeArguments);
- if (typeParamCompare === "Equal" /* NodeComparisonResult.Equal */) {
- return "Equal" /* NodeComparisonResult.Equal */;
+ if (typeParamCompare === NodeComparisonResult.Equal) {
+ return NodeComparisonResult.Equal;
}
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
case utils_1.AST_NODE_TYPES.ChainExpression:
@@ -201,14 +211,14 @@
case utils_1.AST_NODE_TYPES.PrivateIdentifier:
if (nodeA.name === nodeB.name) {
- return "Equal" /* NodeComparisonResult.Equal */;
+ return NodeComparisonResult.Equal;
}
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
case utils_1.AST_NODE_TYPES.Literal: {
const nodeBLiteral = nodeB;
if (nodeA.raw === nodeBLiteral.raw &&
nodeA.value === nodeBLiteral.value) {
- return "Equal" /* NodeComparisonResult.Equal */;
+ return NodeComparisonResult.Equal;
}
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
case utils_1.AST_NODE_TYPES.MemberExpression: {
@@ -217,5 +227,5 @@
// Private identifiers in optional chaining is not currently allowed
// TODO - handle this once TS supports it (https://github.com/microsoft/TypeScript/issues/42734)
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
// check for cases like
@@ -232,9 +242,9 @@
// we don't want to check the property in this case
const aSubsetOfB = compareNodes(nodeA, nodeBMember.object);
- if (aSubsetOfB !== "Invalid" /* NodeComparisonResult.Invalid */) {
- return "Subset" /* NodeComparisonResult.Subset */;
+ if (aSubsetOfB !== NodeComparisonResult.Invalid) {
+ return NodeComparisonResult.Subset;
}
if (nodeA.computed !== nodeBMember.computed) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
// NOTE - we purposely ignore optional flag because for our purposes
@@ -244,6 +254,6 @@
// are going to be exactly the same
const objectCompare = compareNodes(nodeA.object, nodeBMember.object);
- if (objectCompare !== "Equal" /* NodeComparisonResult.Equal */) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ if (objectCompare !== NodeComparisonResult.Equal) {
+ return NodeComparisonResult.Invalid;
}
return compareNodes(nodeA.property, nodeBMember.property);
@@ -258,14 +268,14 @@
});
if (!areQuasisEqual) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
- return "Equal" /* NodeComparisonResult.Equal */;
+ return NodeComparisonResult.Equal;
}
case utils_1.AST_NODE_TYPES.TemplateElement: {
const nodeBElement = nodeB;
if (nodeA.value.cooked === nodeBElement.value.cooked) {
- return "Equal" /* NodeComparisonResult.Equal */;
+ return NodeComparisonResult.Equal;
}
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
// these aren't actually valid expressions.
@@ -274,11 +284,11 @@
case utils_1.AST_NODE_TYPES.ObjectPattern:
/* istanbul ignore next */
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
// update expression returns a number and also changes the value each time - so it makes no sense to compare the chain
case utils_1.AST_NODE_TYPES.UpdateExpression:
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
// yield returns the value passed to the `next` function, so it may not be the same each time - so it makes no sense to compare the chain
case utils_1.AST_NODE_TYPES.YieldExpression:
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
// general-case automatic handling of nodes to save us implementing every
// single case by hand. This just iterates the visitor keys to recursively
@@ -298,7 +308,7 @@
if (nodeA == null || nodeB == null) {
if (nodeA !== nodeB) {
- return "Invalid" /* NodeComparisonResult.Invalid */;
+ return NodeComparisonResult.Invalid;
}
- return "Equal" /* NodeComparisonResult.Equal */;
+ return NodeComparisonResult.Equal;
}
const cached = COMPARE_NODES_CACHE.get(nodeA)?.get(nodeB);
@@ -315,3 +325,2 @@
return result;
}
-//# sourceMappingURL=compareNodes.js.map
\ No newline at end of file
diff --git a/dist/rules/consistent-generic-constructors.js b/dist/rules/consistent-generic-constructors.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/consistent-generic-constructors.js
+++ b/dist/rules/consistent-generic-constructors.js
@@ -109,3 +109,2 @@
},
});
-//# sourceMappingURL=consistent-generic-constructors.js.map
\ No newline at end of file
diff --git a/dist/rules/consistent-indexed-object-style.js b/dist/rules/consistent-indexed-object-style.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/consistent-indexed-object-style.js
+++ b/dist/rules/consistent-indexed-object-style.js
@@ -249,3 +249,2 @@
return false;
}
-//# sourceMappingURL=consistent-indexed-object-style.js.map
\ No newline at end of file
diff --git a/dist/rules/consistent-return.js b/dist/rules/consistent-return.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/consistent-return.js
+++ b/dist/rules/consistent-return.js
@@ -134,3 +134,2 @@
},
});
-//# sourceMappingURL=consistent-return.js.map
\ No newline at end of file
diff --git a/dist/rules/consistent-type-assertions.js b/dist/rules/consistent-type-assertions.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/consistent-type-assertions.js
+++ b/dist/rules/consistent-type-assertions.js
@@ -255,3 +255,2 @@
},
});
-//# sourceMappingURL=consistent-type-assertions.js.map
\ No newline at end of file
diff --git a/dist/rules/consistent-type-definitions.js b/dist/rules/consistent-type-definitions.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/consistent-type-definitions.js
+++ b/dist/rules/consistent-type-definitions.js
@@ -99,3 +99,2 @@
},
});
-//# sourceMappingURL=consistent-type-definitions.js.map
\ No newline at end of file
diff --git a/dist/rules/consistent-type-exports.js b/dist/rules/consistent-type-exports.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/consistent-type-exports.js
+++ b/dist/rules/consistent-type-exports.js
@@ -334,3 +334,2 @@
return `${localName}${exportedName !== localName ? ` as ${exportedName}` : ''}`;
}
-//# sourceMappingURL=consistent-type-exports.js.map
\ No newline at end of file
diff --git a/dist/rules/consistent-type-imports.js b/dist/rules/consistent-type-imports.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/consistent-type-imports.js
+++ b/dist/rules/consistent-type-imports.js
@@ -607,3 +607,2 @@
},
});
-//# sourceMappingURL=consistent-type-imports.js.map
\ No newline at end of file
diff --git a/dist/util/createRule.js b/dist/util/createRule.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/createRule.js
+++ b/dist/util/createRule.js
@@ -4,3 +4,2 @@
const utils_1 = require("@typescript-eslint/utils");
exports.createRule = utils_1.ESLintUtils.RuleCreator(name => `https://typescript-eslint.io/rules/${name}`);
-//# sourceMappingURL=createRule.js.map
\ No newline at end of file
diff --git a/dist/rules/default-param-last.js b/dist/rules/default-param-last.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/default-param-last.js
+++ b/dist/rules/default-param-last.js
@@ -66,3 +66,2 @@
},
});
-//# sourceMappingURL=default-param-last.js.map
\ No newline at end of file
diff --git a/dist/configs/disable-type-checked.js b/dist/configs/disable-type-checked.js
index v8.24.1..v8.25.0 100644
--- a/dist/configs/disable-type-checked.js
+++ b/dist/configs/disable-type-checked.js
@@ -69,3 +69,2 @@
},
};
-//# sourceMappingURL=disable-type-checked.js.map
\ No newline at end of file
diff --git a/dist/rules/dot-notation.js b/dist/rules/dot-notation.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/dot-notation.js
+++ b/dist/rules/dot-notation.js
@@ -142,3 +142,2 @@
},
});
-//# sourceMappingURL=dot-notation.js.map
\ No newline at end of file
diff --git a/dist/rules/naming-convention-utils/enums.js b/dist/rules/naming-convention-utils/enums.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/naming-convention-utils/enums.js
+++ b/dist/rules/naming-convention-utils/enums.js
@@ -101,3 +101,2 @@
TypeModifiers[TypeModifiers["array"] = 2097152] = "array";
})(TypeModifiers || (exports.TypeModifiers = TypeModifiers = {}));
-//# sourceMappingURL=enums.js.map
\ No newline at end of file
diff --git a/dist/util/escapeRegExp.js b/dist/util/escapeRegExp.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/escapeRegExp.js
+++ b/dist/util/escapeRegExp.js
@@ -13,3 +13,2 @@
: string;
}
-//# sourceMappingURL=escapeRegExp.js.map
\ No newline at end of file
diff --git a/dist/configs/eslint-recommended-raw.js b/dist/configs/eslint-recommended-raw.js
index v8.24.1..v8.25.0 100644
--- a/dist/configs/eslint-recommended-raw.js
+++ b/dist/configs/eslint-recommended-raw.js
@@ -41,3 +41,2 @@
});
module.exports = config;
-//# sourceMappingURL=eslint-recommended-raw.js.map
\ No newline at end of file
diff --git a/dist/configs/eslint-recommended.js b/dist/configs/eslint-recommended.js
index v8.24.1..v8.25.0 100644
--- a/dist/configs/eslint-recommended.js
+++ b/dist/configs/eslint-recommended.js
@@ -12,3 +12,2 @@
overrides: [(0, eslint_recommended_raw_1.default)('glob')],
};
-//# sourceMappingURL=eslint-recommended.js.map
\ No newline at end of file
diff --git a/dist/rules/explicit-function-return-type.js b/dist/rules/explicit-function-return-type.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/explicit-function-return-type.js
+++ b/dist/rules/explicit-function-return-type.js
@@ -178,3 +178,2 @@
},
});
-//# sourceMappingURL=explicit-function-return-type.js.map
\ No newline at end of file
diff --git a/dist/rules/explicit-member-accessibility.js b/dist/rules/explicit-member-accessibility.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/explicit-member-accessibility.js
+++ b/dist/rules/explicit-member-accessibility.js
@@ -291,3 +291,2 @@
},
});
-//# sourceMappingURL=explicit-member-accessibility.js.map
\ No newline at end of file
diff --git a/dist/rules/explicit-module-boundary-types.js b/dist/rules/explicit-module-boundary-types.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/explicit-module-boundary-types.js
+++ b/dist/rules/explicit-module-boundary-types.js
@@ -371,3 +371,2 @@
},
});
-//# sourceMappingURL=explicit-module-boundary-types.js.map
\ No newline at end of file
diff --git a/dist/util/explicitReturnTypeUtils.js b/dist/util/explicitReturnTypeUtils.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/explicitReturnTypeUtils.js
+++ b/dist/util/explicitReturnTypeUtils.js
@@ -239,3 +239,2 @@
return false;
}
-//# sourceMappingURL=explicitReturnTypeUtils.js.map
\ No newline at end of file
diff --git a/dist/rules/naming-convention-utils/format.js b/dist/rules/naming-convention-utils/format.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/naming-convention-utils/format.js
+++ b/dist/rules/naming-convention-utils/format.js
@@ -88,3 +88,2 @@
[enums_1.PredefinedFormats.UPPER_CASE]: isUpperCase,
};
-//# sourceMappingURL=format.js.map
\ No newline at end of file
diff --git a/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js b/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js
+++ b/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js
@@ -34,4 +34,5 @@
})();
Object.defineProperty(exports, "__esModule", { value: true });
+exports.NullishComparisonType = exports.OperandValidity = void 0;
exports.gatherLogicalOperands = gatherLogicalOperands;
const utils_1 = require("@typescript-eslint/utils");
@@ -39,4 +40,34 @@
const ts = __importStar(require("typescript"));
const util_1 = require("../../util");
+var ComparisonValueType;
+(function (ComparisonValueType) {
+ ComparisonValueType["Null"] = "Null";
+ ComparisonValueType["Undefined"] = "Undefined";
+ ComparisonValueType["UndefinedStringLiteral"] = "UndefinedStringLiteral";
+})(ComparisonValueType || (ComparisonValueType = {}));
+var OperandValidity;
+(function (OperandValidity) {
+ OperandValidity["Valid"] = "Valid";
+ OperandValidity["Invalid"] = "Invalid";
+})(OperandValidity || (exports.OperandValidity = OperandValidity = {}));
+var NullishComparisonType;
+(function (NullishComparisonType) {
+ /** `x != null`, `x != undefined` */
+ NullishComparisonType["NotEqualNullOrUndefined"] = "NotEqualNullOrUndefined";
+ /** `x == null`, `x == undefined` */
+ NullishComparisonType["EqualNullOrUndefined"] = "EqualNullOrUndefined";
+ /** `x !== null` */
+ NullishComparisonType["NotStrictEqualNull"] = "NotStrictEqualNull";
+ /** `x === null` */
+ NullishComparisonType["StrictEqualNull"] = "StrictEqualNull";
+ /** `x !== undefined`, `typeof x !== 'undefined'` */
+ NullishComparisonType["NotStrictEqualUndefined"] = "NotStrictEqualUndefined";
+ /** `x === undefined`, `typeof x === 'undefined'` */
+ NullishComparisonType["StrictEqualUndefined"] = "StrictEqualUndefined";
+ /** `!x` */
+ NullishComparisonType["NotBoolean"] = "NotBoolean";
+ /** `x` */
+ NullishComparisonType["Boolean"] = "Boolean";
+})(NullishComparisonType || (exports.NullishComparisonType = NullishComparisonType = {}));
const NULLISH_FLAGS = ts.TypeFlags.Null | ts.TypeFlags.Undefined;
function isValidFalseBooleanCheckType(node, disallowFalseyLiteral, parserServices, options) {
@@ -105,5 +136,5 @@
};
})();
- if (comparedValue === "UndefinedStringLiteral" /* ComparisonValueType.UndefinedStringLiteral */) {
+ if (comparedValue === ComparisonValueType.UndefinedStringLiteral) {
if (comparedExpression.type === utils_1.AST_NODE_TYPES.UnaryExpression &&
comparedExpression.operator === 'typeof') {
@@ -112,5 +143,5 @@
// typeof window === 'undefined'
(0, util_1.isReferenceToGlobalFunction)(argument.name, argument, sourceCode)) {
- result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
+ result.push({ type: OperandValidity.Invalid });
continue;
}
@@ -119,14 +150,14 @@
comparedName: comparedExpression.argument,
comparisonType: operand.operator.startsWith('!')
- ? "NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */
- : "StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */,
+ ? NullishComparisonType.NotStrictEqualUndefined
+ : NullishComparisonType.StrictEqualUndefined,
isYoda,
node: operand,
- type: "Valid" /* OperandValidity.Valid */,
+ type: OperandValidity.Valid,
});
continue;
}
// y === 'undefined'
- result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
+ result.push({ type: OperandValidity.Invalid });
continue;
}
@@ -134,20 +165,20 @@
case '!=':
case '==':
- if (comparedValue === "Null" /* ComparisonValueType.Null */ ||
- comparedValue === "Undefined" /* ComparisonValueType.Undefined */) {
+ if (comparedValue === ComparisonValueType.Null ||
+ comparedValue === ComparisonValueType.Undefined) {
// x == null, x == undefined
result.push({
comparedName: comparedExpression,
comparisonType: operand.operator.startsWith('!')
- ? "NotEqualNullOrUndefined" /* NullishComparisonType.NotEqualNullOrUndefined */
- : "EqualNullOrUndefined" /* NullishComparisonType.EqualNullOrUndefined */,
+ ? NullishComparisonType.NotEqualNullOrUndefined
+ : NullishComparisonType.EqualNullOrUndefined,
isYoda,
node: operand,
- type: "Valid" /* OperandValidity.Valid */,
+ type: OperandValidity.Valid,
});
continue;
}
// x == something :(
- result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
+ result.push({ type: OperandValidity.Invalid });
continue;
case '!==':
@@ -155,34 +186,34 @@
const comparedName = comparedExpression;
switch (comparedValue) {
- case "Null" /* ComparisonValueType.Null */:
+ case ComparisonValueType.Null:
result.push({
comparedName,
comparisonType: operand.operator.startsWith('!')
- ? "NotStrictEqualNull" /* NullishComparisonType.NotStrictEqualNull */
- : "StrictEqualNull" /* NullishComparisonType.StrictEqualNull */,
+ ? NullishComparisonType.NotStrictEqualNull
+ : NullishComparisonType.StrictEqualNull,
isYoda,
node: operand,
- type: "Valid" /* OperandValidity.Valid */,
+ type: OperandValidity.Valid,
});
continue;
- case "Undefined" /* ComparisonValueType.Undefined */:
+ case ComparisonValueType.Undefined:
result.push({
comparedName,
comparisonType: operand.operator.startsWith('!')
- ? "NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */
- : "StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */,
+ ? NullishComparisonType.NotStrictEqualUndefined
+ : NullishComparisonType.StrictEqualUndefined,
isYoda,
node: operand,
- type: "Valid" /* OperandValidity.Valid */,
+ type: OperandValidity.Valid,
});
continue;
default:
// x === something :(
- result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
+ result.push({ type: OperandValidity.Invalid });
continue;
}
}
}
- result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
+ result.push({ type: OperandValidity.Invalid });
continue;
}
@@ -192,16 +223,16 @@
result.push({
comparedName: operand.argument,
- comparisonType: "NotBoolean" /* NullishComparisonType.NotBoolean */,
+ comparisonType: NullishComparisonType.NotBoolean,
isYoda: false,
node: operand,
- type: "Valid" /* OperandValidity.Valid */,
+ type: OperandValidity.Valid,
});
continue;
}
- result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
+ result.push({ type: OperandValidity.Invalid });
continue;
case utils_1.AST_NODE_TYPES.LogicalExpression:
// explicitly ignore the mixed logical expression cases
- result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
+ result.push({ type: OperandValidity.Invalid });
continue;
default:
@@ -209,12 +240,12 @@
result.push({
comparedName: operand,
- comparisonType: "Boolean" /* NullishComparisonType.Boolean */,
+ comparisonType: NullishComparisonType.Boolean,
isYoda: false,
node: operand,
- type: "Valid" /* OperandValidity.Valid */,
+ type: OperandValidity.Valid,
});
}
else {
- result.push({ type: "Invalid" /* OperandValidity.Invalid */ });
+ result.push({ type: OperandValidity.Invalid });
}
continue;
@@ -272,13 +303,13 @@
// eslint-disable-next-line eqeqeq, @typescript-eslint/internal/eqeq-nullish -- intentional exact comparison against null
if (node.value === null && node.raw === 'null') {
- return "Null" /* ComparisonValueType.Null */;
+ return ComparisonValueType.Null;
}
if (node.value === 'undefined') {
- return "UndefinedStringLiteral" /* ComparisonValueType.UndefinedStringLiteral */;
+ return ComparisonValueType.UndefinedStringLiteral;
}
return null;
case utils_1.AST_NODE_TYPES.Identifier:
if (node.name === 'undefined') {
- return "Undefined" /* ComparisonValueType.Undefined */;
+ return ComparisonValueType.Undefined;
}
return null;
@@ -287,3 +318,2 @@
}
}
-//# sourceMappingURL=gatherLogicalOperands.js.map
\ No newline at end of file
diff --git a/dist/util/getConstraintInfo.js b/dist/util/getConstraintInfo.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getConstraintInfo.js
+++ b/dist/util/getConstraintInfo.js
@@ -69,3 +69,2 @@
};
}
-//# sourceMappingURL=getConstraintInfo.js.map
\ No newline at end of file
diff --git a/dist/util/getESLintCoreRule.js b/dist/util/getESLintCoreRule.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getESLintCoreRule.js
+++ b/dist/util/getESLintCoreRule.js
@@ -15,3 +15,2 @@
}
}
-//# sourceMappingURL=getESLintCoreRule.js.map
\ No newline at end of file
diff --git a/dist/util/getFixOrSuggest.js b/dist/util/getFixOrSuggest.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getFixOrSuggest.js
+++ b/dist/util/getFixOrSuggest.js
@@ -12,3 +12,2 @@
}
}
-//# sourceMappingURL=getFixOrSuggest.js.map
\ No newline at end of file
diff --git a/dist/util/getForStatementHeadLoc.js b/dist/util/getForStatementHeadLoc.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getForStatementHeadLoc.js
+++ b/dist/util/getForStatementHeadLoc.js
@@ -25,3 +25,2 @@
};
}
-//# sourceMappingURL=getForStatementHeadLoc.js.map
\ No newline at end of file
diff --git a/dist/util/getFunctionHeadLoc.js b/dist/util/getFunctionHeadLoc.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getFunctionHeadLoc.js
+++ b/dist/util/getFunctionHeadLoc.js
@@ -160,3 +160,2 @@
};
}
-//# sourceMappingURL=getFunctionHeadLoc.js.map
\ No newline at end of file
diff --git a/dist/util/getMemberHeadLoc.js b/dist/util/getMemberHeadLoc.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getMemberHeadLoc.js
+++ b/dist/util/getMemberHeadLoc.js
@@ -78,3 +78,2 @@
};
}
-//# sourceMappingURL=getMemberHeadLoc.js.map
\ No newline at end of file
diff --git a/dist/util/getOperatorPrecedence.js b/dist/util/getOperatorPrecedence.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getOperatorPrecedence.js
+++ b/dist/util/getOperatorPrecedence.js
@@ -416,3 +416,2 @@
return -1;
}
-//# sourceMappingURL=getOperatorPrecedence.js.map
\ No newline at end of file
diff --git a/dist/util/getParentFunctionNode.js b/dist/util/getParentFunctionNode.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getParentFunctionNode.js
+++ b/dist/util/getParentFunctionNode.js
@@ -17,3 +17,2 @@
/* istanbul ignore next */ return null;
}
-//# sourceMappingURL=getParentFunctionNode.js.map
\ No newline at end of file
diff --git a/dist/util/getStaticStringValue.js b/dist/util/getStaticStringValue.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getStaticStringValue.js
+++ b/dist/util/getStaticStringValue.js
@@ -43,3 +43,2 @@
return null;
}
-//# sourceMappingURL=getStaticStringValue.js.map
\ No newline at end of file
diff --git a/dist/util/getStringLength.js b/dist/util/getStringLength.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getStringLength.js
+++ b/dist/util/getStringLength.js
@@ -17,3 +17,2 @@
return splitter.countGraphemes(value);
}
-//# sourceMappingURL=getStringLength.js.map
\ No newline at end of file
diff --git a/dist/util/getTextWithParentheses.js b/dist/util/getTextWithParentheses.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getTextWithParentheses.js
+++ b/dist/util/getTextWithParentheses.js
@@ -15,3 +15,2 @@
return sourceCode.getText(node, beforeCount, afterCount);
}
-//# sourceMappingURL=getTextWithParentheses.js.map
\ No newline at end of file
diff --git a/dist/util/getThisExpression.js b/dist/util/getThisExpression.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getThisExpression.js
+++ b/dist/util/getThisExpression.js
@@ -23,3 +23,2 @@
return;
}
-//# sourceMappingURL=getThisExpression.js.map
\ No newline at end of file
diff --git a/dist/util/getValueOfLiteralType.js b/dist/util/getValueOfLiteralType.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getValueOfLiteralType.js
+++ b/dist/util/getValueOfLiteralType.js
@@ -15,3 +15,2 @@
};
exports.getValueOfLiteralType = getValueOfLiteralType;
-//# sourceMappingURL=getValueOfLiteralType.js.map
\ No newline at end of file
diff --git a/dist/util/getWrappedCode.js b/dist/util/getWrappedCode.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getWrappedCode.js
+++ b/dist/util/getWrappedCode.js
@@ -5,3 +5,2 @@
return nodePrecedence > parentPrecedence ? text : `(${text})`;
}
-//# sourceMappingURL=getWrappedCode.js.map
\ No newline at end of file
diff --git a/dist/util/getWrappingFixer.js b/dist/util/getWrappingFixer.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/getWrappingFixer.js
+++ b/dist/util/getWrappingFixer.js
@@ -180,3 +180,2 @@
innerNode.type === utils_1.AST_NODE_TYPES.ObjectExpression);
}
-//# sourceMappingURL=getWrappingFixer.js.map
\ No newline at end of file
diff --git a/dist/index.js b/dist/index.js
index v8.24.1..v8.25.0 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -45,3 +45,2 @@
rules: rules_1.default,
};
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/dist/rules/index.js b/dist/rules/index.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/index.js
+++ b/dist/rules/index.js
@@ -266,3 +266,2 @@
};
module.exports = rules;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/dist/rules/naming-convention-utils/index.js b/dist/rules/naming-convention-utils/index.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/naming-convention-utils/index.js
+++ b/dist/rules/naming-convention-utils/index.js
@@ -10,3 +10,2 @@
var shared_1 = require("./shared");
Object.defineProperty(exports, "selectorTypeToMessageString", { enumerable: true, get: function () { return shared_1.selectorTypeToMessageString; } });
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/dist/util/index.js b/dist/util/index.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/index.js
+++ b/dist/util/index.js
@@ -28,4 +28,5 @@
__exportStar(require("./getThisExpression"), exports);
__exportStar(require("./getWrappingFixer"), exports);
+__exportStar(require("./hasOverloadSignatures"), exports);
__exportStar(require("./isArrayMethodCallWithPredicate"), exports);
__exportStar(require("./isAssignee"), exports);
@@ -42,7 +43,8 @@
__exportStar(require("./getConstraintInfo"), exports);
__exportStar(require("./getValueOfLiteralType"), exports);
+__exportStar(require("./isHigherPrecedenceThanAwait"), exports);
+__exportStar(require("./skipChainExpression"), exports);
__exportStar(require("./truthinessAndNullishUtils"), exports);
// this is done for convenience - saves migrating all of the old rules
__exportStar(require("@typescript-eslint/type-utils"), exports);
exports.applyDefault = utils_1.ESLintUtils.applyDefault, exports.deepMerge = utils_1.ESLintUtils.deepMerge, exports.getParserServices = utils_1.ESLintUtils.getParserServices, exports.isObjectNotArray = utils_1.ESLintUtils.isObjectNotArray, exports.nullThrows = utils_1.ESLintUtils.nullThrows, exports.NullThrowsReasons = utils_1.ESLintUtils.NullThrowsReasons;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/dist/rules/init-declarations.js b/dist/rules/init-declarations.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/init-declarations.js
+++ b/dist/rules/init-declarations.js
@@ -103,3 +103,2 @@
};
}
-//# sourceMappingURL=init-declarations.js.map
\ No newline at end of file
diff --git a/dist/util/isArrayMethodCallWithPredicate.js b/dist/util/isArrayMethodCallWithPredicate.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/isArrayMethodCallWithPredicate.js
+++ b/dist/util/isArrayMethodCallWithPredicate.js
@@ -63,3 +63,2 @@
.some(t => checker.isArrayType(t) || checker.isTupleType(t));
}
-//# sourceMappingURL=isArrayMethodCallWithPredicate.js.map
\ No newline at end of file
diff --git a/dist/util/isAssignee.js b/dist/util/isAssignee.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/isAssignee.js
+++ b/dist/util/isAssignee.js
@@ -41,3 +41,2 @@
return false;
}
-//# sourceMappingURL=isAssignee.js.map
\ No newline at end of file
diff --git a/dist/util/isNodeEqual.js b/dist/util/isNodeEqual.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/isNodeEqual.js
+++ b/dist/util/isNodeEqual.js
@@ -24,3 +24,2 @@
return false;
}
-//# sourceMappingURL=isNodeEqual.js.map
\ No newline at end of file
diff --git a/dist/util/isNullLiteral.js b/dist/util/isNullLiteral.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/isNullLiteral.js
+++ b/dist/util/isNullLiteral.js
@@ -6,3 +6,2 @@
return i.type === utils_1.AST_NODE_TYPES.Literal && i.value == null;
}
-//# sourceMappingURL=isNullLiteral.js.map
\ No newline at end of file
diff --git a/dist/util/isStartOfExpressionStatement.js b/dist/util/isStartOfExpressionStatement.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/isStartOfExpressionStatement.js
+++ b/dist/util/isStartOfExpressionStatement.js
@@ -21,3 +21,2 @@
return false;
}
-//# sourceMappingURL=isStartOfExpressionStatement.js.map
\ No newline at end of file
diff --git a/dist/util/isTypeImport.js b/dist/util/isTypeImport.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/isTypeImport.js
+++ b/dist/util/isTypeImport.js
@@ -20,3 +20,2 @@
definition.node.importKind === 'type')));
}
-//# sourceMappingURL=isTypeImport.js.map
\ No newline at end of file
diff --git a/dist/util/isUndefinedIdentifier.js b/dist/util/isUndefinedIdentifier.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/isUndefinedIdentifier.js
+++ b/dist/util/isUndefinedIdentifier.js
@@ -6,3 +6,2 @@
return i.type === utils_1.AST_NODE_TYPES.Identifier && i.name === 'undefined';
}
-//# sourceMappingURL=isUndefinedIdentifier.js.map
\ No newline at end of file
diff --git a/dist/rules/max-params.js b/dist/rules/max-params.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/max-params.js
+++ b/dist/rules/max-params.js
@@ -71,3 +71,2 @@
},
});
-//# sourceMappingURL=max-params.js.map
\ No newline at end of file
diff --git a/dist/rules/member-ordering.js b/dist/rules/member-ordering.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/member-ordering.js
+++ b/dist/rules/member-ordering.js
@@ -826,3 +826,2 @@
},
});
-//# sourceMappingURL=member-ordering.js.map
\ No newline at end of file
diff --git a/dist/rules/method-signature-style.js b/dist/rules/method-signature-style.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/method-signature-style.js
+++ b/dist/rules/method-signature-style.js
@@ -175,3 +175,2 @@
},
});
-//# sourceMappingURL=method-signature-style.js.map
\ No newline at end of file
diff --git a/dist/util/misc.js b/dist/util/misc.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/misc.js
+++ b/dist/util/misc.js
@@ -272,3 +272,2 @@
const isStaticMemberAccessOfValue = (memberExpression, context, ...values) => values.includes(getStaticMemberAccessValue(memberExpression, context));
exports.isStaticMemberAccessOfValue = isStaticMemberAccessOfValue;
-//# sourceMappingURL=misc.js.map
\ No newline at end of file
diff --git a/dist/rules/naming-convention.js b/dist/rules/naming-convention.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/naming-convention.js
+++ b/dist/rules/naming-convention.js
@@ -503,3 +503,2 @@
return (0, util_1.requiresQuoting)(name, target);
}
-//# sourceMappingURL=naming-convention.js.map
\ No newline at end of file
diff --git a/dist/util/needsPrecedingSemiColon.js b/dist/util/needsPrecedingSemiColon.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/needsPrecedingSemiColon.js
+++ b/dist/util/needsPrecedingSemiColon.js
@@ -96,3 +96,2 @@
return true;
}
-//# sourceMappingURL=needsPrecedingSemiColon.js.map
\ No newline at end of file
diff --git a/dist/util/needsToBeAwaited.js b/dist/util/needsToBeAwaited.js
index v8.24.1..v8.25.0 100644
--- a/dist/util/needsToBeAwaited.js
+++ b/dist/util/needsToBeAwaited.js
@@ -62,3 +62,2 @@
return Awaitable.Never;
}
-//# sourceMappingURL=needsToBeAwaited.js.map
\ No newline at end of file
diff --git a/dist/rules/no-array-constructor.js b/dist/rules/no-array-constructor.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-array-constructor.js
+++ b/dist/rules/no-array-constructor.js
@@ -50,3 +50,2 @@
},
});
-//# sourceMappingURL=no-array-constructor.js.map
\ No newline at end of file
diff --git a/dist/rules/no-array-delete.js b/dist/rules/no-array-delete.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-array-delete.js
+++ b/dist/rules/no-array-delete.js
@@ -79,3 +79,2 @@
},
});
-//# sourceMappingURL=no-array-delete.js.map
\ No newline at end of file
diff --git a/dist/rules/no-base-to-string.js b/dist/rules/no-base-to-string.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-base-to-string.js
+++ b/dist/rules/no-base-to-string.js
@@ -265,3 +265,2 @@
},
});
-//# sourceMappingURL=no-base-to-string.js.map
\ No newline at end of file
diff --git a/dist/rules/no-confusing-non-null-assertion.js b/dist/rules/no-confusing-non-null-assertion.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-confusing-non-null-assertion.js
+++ b/dist/rules/no-confusing-non-null-assertion.js
@@ -141,3 +141,2 @@
];
}
-//# sourceMappingURL=no-confusing-non-null-assertion.js.map
\ No newline at end of file
diff --git a/dist/rules/no-confusing-void-expression.js b/dist/rules/no-confusing-void-expression.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-confusing-void-expression.js
+++ b/dist/rules/no-confusing-void-expression.js
@@ -358,3 +358,2 @@
},
});
-//# sourceMappingURL=no-confusing-void-expression.js.map
\ No newline at end of file
diff --git a/dist/rules/no-deprecated.js b/dist/rules/no-deprecated.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-deprecated.js
+++ b/dist/rules/no-deprecated.js
@@ -304,5 +304,5 @@
return;
}
- const name = node.type === utils_1.AST_NODE_TYPES.Super ? 'super' : node.name;
+ const name = getReportedNodeName(node);
context.report({
...(reason
@@ -325,7 +325,16 @@
}
},
+ PrivateIdentifier: checkIdentifier,
Super: checkIdentifier,
};
},
});
-//# sourceMappingURL=no-deprecated.js.map
\ No newline at end of file
+function getReportedNodeName(node) {
+ if (node.type === utils_1.AST_NODE_TYPES.Super) {
+ return 'super';
+ }
+ if (node.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) {
+ return `#${node.name}`;
+ }
+ return node.name;
+}
diff --git a/dist/rules/no-dupe-class-members.js b/dist/rules/no-dupe-class-members.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-dupe-class-members.js
+++ b/dist/rules/no-dupe-class-members.js
@@ -39,3 +39,2 @@
},
});
-//# sourceMappingURL=no-dupe-class-members.js.map
\ No newline at end of file
diff --git a/dist/rules/no-duplicate-enum-values.js b/dist/rules/no-duplicate-enum-values.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-duplicate-enum-values.js
+++ b/dist/rules/no-duplicate-enum-values.js
@@ -68,3 +68,2 @@
},
});
-//# sourceMappingURL=no-duplicate-enum-values.js.map
\ No newline at end of file
diff --git a/dist/rules/no-duplicate-type-constituents.js b/dist/rules/no-duplicate-type-constituents.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-duplicate-type-constituents.js
+++ b/dist/rules/no-duplicate-type-constituents.js
@@ -218,3 +218,2 @@
},
});
-//# sourceMappingURL=no-duplicate-type-constituents.js.map
\ No newline at end of file
diff --git a/dist/rules/no-dynamic-delete.js b/dist/rules/no-dynamic-delete.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-dynamic-delete.js
+++ b/dist/rules/no-dynamic-delete.js
@@ -59,3 +59,2 @@
typeof property.argument.value === 'number'));
}
-//# sourceMappingURL=no-dynamic-delete.js.map
\ No newline at end of file
diff --git a/dist/rules/no-empty-function.js b/dist/rules/no-empty-function.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-empty-function.js
+++ b/dist/rules/no-empty-function.js
@@ -133,3 +133,2 @@
},
});
-//# sourceMappingURL=no-empty-function.js.map
\ No newline at end of file
diff --git a/dist/rules/no-empty-interface.js b/dist/rules/no-empty-interface.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-empty-interface.js
+++ b/dist/rules/no-empty-interface.js
@@ -90,3 +90,2 @@
},
});
-//# sourceMappingURL=no-empty-interface.js.map
\ No newline at end of file
diff --git a/dist/rules/no-empty-object-type.js b/dist/rules/no-empty-object-type.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-empty-object-type.js
+++ b/dist/rules/no-empty-object-type.js
@@ -142,3 +142,2 @@
},
});
-//# sourceMappingURL=no-empty-object-type.js.map
\ No newline at end of file
diff --git a/dist/rules/no-explicit-any.js b/dist/rules/no-explicit-any.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-explicit-any.js
+++ b/dist/rules/no-explicit-any.js
@@ -168,3 +168,2 @@
},
});
-//# sourceMappingURL=no-explicit-any.js.map
\ No newline at end of file
diff --git a/dist/rules/no-extra-non-null-assertion.js b/dist/rules/no-extra-non-null-assertion.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-extra-non-null-assertion.js
+++ b/dist/rules/no-extra-non-null-assertion.js
@@ -34,3 +34,2 @@
},
});
-//# sourceMappingURL=no-extra-non-null-assertion.js.map
\ No newline at end of file
diff --git a/dist/rules/no-extraneous-class.js b/dist/rules/no-extraneous-class.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-extraneous-class.js
+++ b/dist/rules/no-extraneous-class.js
@@ -119,3 +119,2 @@
},
});
-//# sourceMappingURL=no-extraneous-class.js.map
\ No newline at end of file
diff --git a/dist/rules/no-floating-promises.js b/dist/rules/no-floating-promises.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-floating-promises.js
+++ b/dist/rules/no-floating-promises.js
@@ -117,8 +117,5 @@
return;
}
- let expression = node.expression;
- if (expression.type === utils_1.AST_NODE_TYPES.ChainExpression) {
- expression = expression.expression;
- }
+ const expression = (0, util_1.skipChainExpression)(node.expression);
if (isKnownSafePromiseReturn(expression)) {
return;
@@ -383,3 +380,2 @@
return false;
}
-//# sourceMappingURL=no-floating-promises.js.map
\ No newline at end of file
diff --git a/dist/rules/no-for-in-array.js b/dist/rules/no-for-in-array.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-for-in-array.js
+++ b/dist/rules/no-for-in-array.js
@@ -85,3 +85,2 @@
return predicate(type);
}
-//# sourceMappingURL=no-for-in-array.js.map
\ No newline at end of file
diff --git a/dist/rules/no-implied-eval.js b/dist/rules/no-implied-eval.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-implied-eval.js
+++ b/dist/rules/no-implied-eval.js
@@ -151,3 +151,2 @@
},
});
-//# sourceMappingURL=no-implied-eval.js.map
\ No newline at end of file
diff --git a/dist/rules/no-import-type-side-effects.js b/dist/rules/no-import-type-side-effects.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-import-type-side-effects.js
+++ b/dist/rules/no-import-type-side-effects.js
@@ -52,3 +52,2 @@
},
});
-//# sourceMappingURL=no-import-type-side-effects.js.map
\ No newline at end of file
diff --git a/dist/rules/no-inferrable-types.js b/dist/rules/no-inferrable-types.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-inferrable-types.js
+++ b/dist/rules/no-inferrable-types.js
@@ -40,10 +40,8 @@
create(context, [{ ignoreParameters, ignoreProperties }]) {
function isFunctionCall(init, callName) {
- if (init.type === utils_1.AST_NODE_TYPES.ChainExpression) {
- return isFunctionCall(init.expression, callName);
- }
- return (init.type === utils_1.AST_NODE_TYPES.CallExpression &&
- init.callee.type === utils_1.AST_NODE_TYPES.Identifier &&
- init.callee.name === callName);
+ const node = (0, util_1.skipChainExpression)(init);
+ return (node.type === utils_1.AST_NODE_TYPES.CallExpression &&
+ node.callee.type === utils_1.AST_NODE_TYPES.Identifier &&
+ node.callee.name === callName);
}
function isLiteral(init, typeName) {
@@ -183,3 +181,2 @@
},
});
-//# sourceMappingURL=no-inferrable-types.js.map
\ No newline at end of file
diff --git a/dist/rules/no-invalid-this.js b/dist/rules/no-invalid-this.js
index v8.24.1..v8.25.0 100644
--- a/dist/rules/no-invalid-this.js
+++ b/dist/rules/no-invalid-this.js
@@ -74,3 +74,2 @@
},
});
-//# sourceMappingURL=no-invalid-this.js.map
\ No newline at end of file
diff --git a/dist/rules/no-invalid-void-type.js b/dist/rules/no-invalid-void-type.js
index v8.24.1..v8.2 (too long so truncated)
Command detailsnpm diff --diff=@typescript-eslint/[email protected] --diff=@typescript-eslint/[email protected] --diff-unified=2 See also the Reported by ybiquitous/[email protected] (Node.js 22.14.0 and npm 11.1.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumps the eslint group with 1 update: @typescript-eslint/eslint-plugin.
Updates
@typescript-eslint/eslint-plugin
from 8.24.1 to 8.25.0Release notes
Sourced from
@typescript-eslint/eslint-plugin
's releases.Changelog
Sourced from
@typescript-eslint/eslint-plugin
's changelog.Commits
1a9ab8f
chore(release): publish 8.25.0a43c199
feat(eslint-plugin): [no-misused-spread] add suggestions (#10719)0a0a085
fix(eslint-plugin): [strict-boolean-expressions] allowNullableBoolean - suppo...b688380
fix(eslint-plugin): [no-invalid-void-type] don't flag function overloading wi...f22de04
fix(eslint-plugin): [prefer-nullish-coalescing] report on chain expressions i...6f87c20
docs(eslint-plugin): [consistent-type-definitions] add FAQs (#10731)fb790dc
fix(eslint-plugin): [no-deprecated] report usage of deprecated private identi...5d503b9
fix(eslint-plugin): [unified-signatures] handle getter-setter (#10818)f3ef20e
chore: update to latest nx and use project references first approach (#10361)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major version
will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor version
will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>
will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>
will remove all of the ignore conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>
will remove the ignore condition of the specified dependency and ignore conditions