generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 4
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 7.16.1 to 7.17.0 in the eslint group #903
Merged
github-actions
merged 1 commit into
main
from
dependabot/npm_and_yarn/eslint-ec2598c377
Jul 22, 2024
Merged
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 7.16.1 to 7.17.0 in the eslint group #903
github-actions
merged 1 commit into
main
from
dependabot/npm_and_yarn/eslint-ec2598c377
Jul 22, 2024
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 7.16.1 to 7.17.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/v7.17.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] <support@github.com>
dependabot
bot
added
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
labels
Jul 22, 2024
Diff between @typescript-eslint/eslint-plugin 7.16.1 and 7.17.0diff --git a/dist/configs/all.js b/dist/configs/all.js
index v7.16.1..v7.17.0 100644
--- a/dist/configs/all.js
+++ b/dist/configs/all.js
@@ -104,4 +104,5 @@
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
+ '@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
@@ -117,4 +118,5 @@
'@typescript-eslint/no-useless-empty-export': 'error',
'@typescript-eslint/no-var-requires': 'error',
+ '@typescript-eslint/no-wrapper-object-types': 'error',
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
'no-throw-literal': 'off',
diff --git a/dist/rules/prefer-optional-chain-utils/analyzeChain.js b/dist/rules/prefer-optional-chain-utils/analyzeChain.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/prefer-optional-chain-utils/analyzeChain.js
+++ b/dist/rules/prefer-optional-chain-utils/analyzeChain.js
@@ -142,42 +142,38 @@
useSuggestionFixer = false;
}
+ // optional chain specifically will union `undefined` into the final type
+ // so we need to make sure that there is at least one operand that includes
+ // `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 */ ||
+ lastOperand.comparisonType ===
+ "NotEqualNullOrUndefined" /* NullishComparisonType.NotEqualNullOrUndefined */ ||
+ lastOperand.comparisonType === "StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */ ||
+ lastOperand.comparisonType ===
+ "NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */ ||
+ (operator === '||' &&
+ lastOperand.comparisonType === "NotBoolean" /* 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
+ // check error
+ useSuggestionFixer = false;
+ }
else {
- // optional chain specifically will union `undefined` into the final type
- // so we need to make sure that there is at least one operand that includes
- // `undefined`, or else we're going to change the final type - which is
- // unsafe and might cause downstream type errors.
- if (lastOperand.comparisonType ===
- "EqualNullOrUndefined" /* NullishComparisonType.EqualNullOrUndefined */ ||
- lastOperand.comparisonType ===
- "NotEqualNullOrUndefined" /* NullishComparisonType.NotEqualNullOrUndefined */ ||
- lastOperand.comparisonType ===
- "StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */ ||
- lastOperand.comparisonType ===
- "NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */ ||
- (operator === '||' &&
- lastOperand.comparisonType === "NotBoolean" /* 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
- // check error
- useSuggestionFixer = false;
- }
- else {
- useSuggestionFixer = true;
- for (const operand of chain) {
- if (includesType(parserServices, operand.node, ts.TypeFlags.Undefined)) {
- useSuggestionFixer = false;
- break;
- }
+ useSuggestionFixer = true;
+ for (const operand of chain) {
+ if (includesType(parserServices, operand.node, ts.TypeFlags.Undefined)) {
+ useSuggestionFixer = false;
+ break;
}
- // TODO - we could further reduce the false-positive rate of this check by
- // checking for cases where the change in types don't matter like
- // the test location of an if/while/etc statement.
- // but it's quite complex to do this without false-negatives, so
- // for now we'll just be over-eager with our matching.
- //
- // it's MUCH better to false-positive here and only provide a
- // suggestion fixer, rather than false-negative and autofix to
- // broken code.
}
+ // TODO - we could further reduce the false-positive rate of this check by
+ // checking for cases where the change in types don't matter like
+ // the test location of an if/while/etc statement.
+ // but it's quite complex to do this without false-negatives, so
+ // for now we'll just be over-eager with our matching.
+ //
+ // it's MUCH better to false-positive here and only provide a
+ // suggestion fixer, rather than false-negative and autofix to
+ // broken code.
}
// In its most naive form we could just slap `?.` for every single part of the
diff --git a/dist/rules/ban-types.js b/dist/rules/ban-types.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/ban-types.js
+++ b/dist/rules/ban-types.js
@@ -171,5 +171,8 @@
const extendDefaults = options.extendDefaults ?? true;
const customTypes = options.types ?? {};
- const types = Object.assign({}, extendDefaults ? defaultTypes : {}, customTypes);
+ const types = {
+ ...(extendDefaults && defaultTypes),
+ ...customTypes,
+ };
const bannedTypes = new Map(Object.entries(types).map(([type, data]) => [removeSpaces(type), data]));
function checkBannedTypes(typeNode, name = stringifyNode(typeNode, context.sourceCode)) {
diff --git a/dist/rules/consistent-type-imports.js b/dist/rules/consistent-type-imports.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/consistent-type-imports.js
+++ b/dist/rules/consistent-type-imports.js
@@ -110,16 +110,14 @@
}
}
- else {
- if (!sourceImports.valueOnlyNamedImport &&
- node.specifiers.length &&
- node.specifiers.every(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier)) {
- sourceImports.valueOnlyNamedImport = node;
- sourceImports.valueImport = node;
- }
- else if (!sourceImports.valueImport &&
- node.specifiers.some(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportDefaultSpecifier)) {
- sourceImports.valueImport = node;
- }
+ else if (!sourceImports.valueOnlyNamedImport &&
+ node.specifiers.length &&
+ node.specifiers.every(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier)) {
+ sourceImports.valueOnlyNamedImport = node;
+ sourceImports.valueImport = node;
}
+ else if (!sourceImports.valueImport &&
+ node.specifiers.some(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportDefaultSpecifier)) {
+ sourceImports.valueImport = node;
+ }
const typeSpecifiers = [];
const inlineTypeSpecifiers = [];
@@ -497,4 +495,5 @@
else {
// The import is both default and named. Insert named on new line because can't mix default type import and named type imports
+ // eslint-disable-next-line no-lonely-if
if (fixStyle === 'inline-type-imports') {
yield fixer.insertTextBefore(node, `import {${typeNamedSpecifiers
diff --git a/dist/rules/func-call-spacing.js b/dist/rules/func-call-spacing.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/func-call-spacing.js
+++ b/dist/rules/func-call-spacing.js
@@ -114,26 +114,24 @@
}
}
- else {
- if (!hasWhitespace) {
- context.report({
- node,
- loc: lastCalleeToken.loc.start,
- messageId: 'missing',
- fix(fixer) {
- return fixer.insertTextBefore(openingParenToken, ' ');
- },
- });
- }
- else if (!config.allowNewlines && hasNewline) {
- context.report({
- node,
- loc: lastCalleeToken.loc.start,
- messageId: 'unexpectedNewline',
- fix(fixer) {
- return fixer.replaceTextRange([lastCalleeToken.range[1], openingParenToken.range[0]], ' ');
- },
- });
- }
+ else if (!hasWhitespace) {
+ context.report({
+ node,
+ loc: lastCalleeToken.loc.start,
+ messageId: 'missing',
+ fix(fixer) {
+ return fixer.insertTextBefore(openingParenToken, ' ');
+ },
+ });
}
+ else if (!config.allowNewlines && hasNewline) {
+ context.report({
+ node,
+ loc: lastCalleeToken.loc.start,
+ messageId: 'unexpectedNewline',
+ fix(fixer) {
+ return fixer.replaceTextRange([lastCalleeToken.range[1], openingParenToken.range[0]], ' ');
+ },
+ });
+ }
}
return {
diff --git a/dist/util/getFunctionHeadLoc.js b/dist/util/getFunctionHeadLoc.js
index v7.16.1..v7.17.0 100644
--- a/dist/util/getFunctionHeadLoc.js
+++ b/dist/util/getFunctionHeadLoc.js
@@ -156,6 +156,6 @@
}
return {
- start: Object.assign({}, start),
- end: Object.assign({}, end),
+ start: { ...start },
+ end: { ...end },
};
}
diff --git a/dist/rules/indent.js b/dist/rules/indent.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/indent.js
+++ b/dist/rules/indent.js
@@ -156,5 +156,6 @@
};
}
- return Object.assign({}, rules, {
+ return {
+ ...rules,
// overwrite the base rule here so we can use our KNOWN_NODES list instead
'*:exit'(node) {
@@ -409,5 +410,5 @@
});
},
- });
+ };
},
});
diff --git a/dist/rules/index.js b/dist/rules/index.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/index.js
+++ b/dist/rules/index.js
@@ -97,4 +97,5 @@
const no_unsafe_declaration_merging_1 = __importDefault(require("./no-unsafe-declaration-merging"));
const no_unsafe_enum_comparison_1 = __importDefault(require("./no-unsafe-enum-comparison"));
+const no_unsafe_function_type_1 = __importDefault(require("./no-unsafe-function-type"));
const no_unsafe_member_access_1 = __importDefault(require("./no-unsafe-member-access"));
const no_unsafe_return_1 = __importDefault(require("./no-unsafe-return"));
@@ -107,4 +108,5 @@
const no_useless_template_literals_1 = __importDefault(require("./no-useless-template-literals"));
const no_var_requires_1 = __importDefault(require("./no-var-requires"));
+const no_wrapper_object_types_1 = __importDefault(require("./no-wrapper-object-types"));
const non_nullable_type_assertion_style_1 = __importDefault(require("./non-nullable-type-assertion-style"));
const object_curly_spacing_1 = __importDefault(require("./object-curly-spacing"));
@@ -245,4 +247,5 @@
'no-unsafe-declaration-merging': no_unsafe_declaration_merging_1.default,
'no-unsafe-enum-comparison': no_unsafe_enum_comparison_1.default,
+ 'no-unsafe-function-type': no_unsafe_function_type_1.default,
'no-unsafe-member-access': no_unsafe_member_access_1.default,
'no-unsafe-return': no_unsafe_return_1.default,
@@ -255,4 +258,5 @@
'no-useless-template-literals': no_useless_template_literals_1.default,
'no-var-requires': no_var_requires_1.default,
+ 'no-wrapper-object-types': no_wrapper_object_types_1.default,
'non-nullable-type-assertion-style': non_nullable_type_assertion_style_1.default,
'object-curly-spacing': object_curly_spacing_1.default,
diff --git a/dist/util/index.js b/dist/util/index.js
index v7.16.1..v7.17.0 100644
--- a/dist/util/index.js
+++ b/dist/util/index.js
@@ -32,4 +32,5 @@
__exportStar(require("./misc"), exports);
__exportStar(require("./objectIterators"), exports);
+__exportStar(require("./scopeUtils"), exports);
__exportStar(require("./types"), exports);
__exportStar(require("./isAssignee"), exports);
diff --git a/dist/rules/member-delimiter-style.js b/dist/rules/member-delimiter-style.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/member-delimiter-style.js
+++ b/dist/rules/member-delimiter-style.js
@@ -187,14 +187,12 @@
}
}
- else {
- if (optsSemi) {
- missingDelimiter = true;
- messageId = 'expectedSemi';
- }
- else if (optsComma) {
- missingDelimiter = true;
- messageId = 'expectedComma';
- }
+ else if (optsSemi) {
+ missingDelimiter = true;
+ messageId = 'expectedSemi';
}
+ else if (optsComma) {
+ missingDelimiter = true;
+ messageId = 'expectedComma';
+ }
if (messageId) {
context.report({
diff --git a/dist/rules/no-extra-parens.js b/dist/rules/no-extra-parens.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/no-extra-parens.js
+++ b/dist/rules/no-extra-parens.js
@@ -270,5 +270,5 @@
},
};
- return Object.assign({}, rules, overrides);
+ return { ...rules, ...overrides };
},
});
diff --git a/dist/rules/no-floating-promises.js b/dist/rules/no-floating-promises.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/no-floating-promises.js
+++ b/dist/rules/no-floating-promises.js
@@ -186,4 +186,7 @@
}
function isUnhandledPromise(checker, node) {
+ if (node.type === utils_1.AST_NODE_TYPES.AssignmentExpression) {
+ return { isUnhandled: false };
+ }
// First, check expressions whose resulting types may not be promise-like
if (node.type === utils_1.AST_NODE_TYPES.SequenceExpression) {
@@ -208,4 +211,12 @@
return { isUnhandled: true, promiseArray: true };
}
+ // await expression addresses promises, but not promise arrays.
+ if (node.type === utils_1.AST_NODE_TYPES.AwaitExpression) {
+ // you would think this wouldn't be strictly necessary, since we're
+ // anyway checking the type of the expression, but, unfortunately TS
+ // reports the result of `await (promise as Promise<number> & number)`
+ // as `Promise<number> & number` instead of `number`.
+ return { isUnhandled: false };
+ }
if (!isPromiseLike(tsNode)) {
return { isUnhandled: false };
@@ -237,7 +248,4 @@
return { isUnhandled: true };
}
- else if (node.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression) {
- return { isUnhandled: true };
- }
else if (node.type === utils_1.AST_NODE_TYPES.ConditionalExpression) {
// We must be getting the promise-like value from one of the branches of the
@@ -249,12 +257,4 @@
return isUnhandledPromise(checker, node.consequent);
}
- else if (node.type === utils_1.AST_NODE_TYPES.MemberExpression ||
- node.type === utils_1.AST_NODE_TYPES.Identifier ||
- node.type === utils_1.AST_NODE_TYPES.NewExpression) {
- // If it is just a property access chain or a `new` call (e.g. `foo.bar` or
- // `new Promise()`), the promise is not handled because it doesn't have the
- // necessary then/catch call at the end of the chain.
- return { isUnhandled: true };
- }
else if (node.type === utils_1.AST_NODE_TYPES.LogicalExpression) {
const leftResult = isUnhandledPromise(checker, node.left);
@@ -264,8 +264,6 @@
return isUnhandledPromise(checker, node.right);
}
- // We conservatively return false for all other types of expressions because
- // we don't want to accidentally fail if the promise is handled internally but
- // we just can't tell.
- return { isUnhandled: false };
+ // Anything else is unhandled.
+ return { isUnhandled: true };
}
function isPromiseArray(node) {
diff --git a/dist/rules/no-mixed-enums.js b/dist/rules/no-mixed-enums.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/no-mixed-enums.js
+++ b/dist/rules/no-mixed-enums.js
@@ -150,13 +150,10 @@
.getSymbolAtLocation(tsNode)
.getDeclarations();
- for (const declaration of declarations) {
- for (const member of declaration.members) {
- return member.initializer
- ? tsutils.isTypeFlagSet(typeChecker.getTypeAtLocation(member.initializer), ts.TypeFlags.StringLike)
- ? AllowedType.String
- : AllowedType.Number
- : AllowedType.Number;
- }
- }
+ const [{ initializer }] = declarations[0]
+ .members;
+ return initializer &&
+ tsutils.isTypeFlagSet(typeChecker.getTypeAtLocation(initializer), ts.TypeFlags.StringLike)
+ ? AllowedType.String
+ : AllowedType.Number;
}
// Finally, we default to the type of the first enum member
diff --git a/dist/rules/no-non-null-assertion.js b/dist/rules/no-non-null-assertion.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/no-non-null-assertion.js
+++ b/dist/rules/no-non-null-assertion.js
@@ -57,19 +57,17 @@
}
}
+ else if (node.parent.computed) {
+ // it is x!?.[y].z
+ suggest.push({
+ messageId: 'suggestOptionalChain',
+ fix: removeToken(),
+ });
+ }
else {
- if (node.parent.computed) {
- // it is x!?.[y].z
- suggest.push({
- messageId: 'suggestOptionalChain',
- fix: removeToken(),
- });
- }
- else {
- // it is x!?.y.z
- suggest.push({
- messageId: 'suggestOptionalChain',
- fix: removeToken(),
- });
- }
+ // it is x!?.y.z
+ suggest.push({
+ messageId: 'suggestOptionalChain',
+ fix: removeToken(),
+ });
}
}
diff --git a/dist/rules/no-unnecessary-condition.js b/dist/rules/no-unnecessary-condition.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/no-unnecessary-condition.js
+++ b/dist/rules/no-unnecessary-condition.js
@@ -152,10 +152,12 @@
}
const property = node.property;
- if (property.type === utils_1.AST_NODE_TYPES.Identifier) {
- const propertyType = objectType.getProperty(property.name);
- if (propertyType &&
- tsutils.isSymbolFlagSet(propertyType, ts.SymbolFlags.Optional)) {
- return true;
- }
+ // Get the actual property name, to account for private properties (this.#prop).
+ const propertyName = context.sourceCode.getText(property);
+ const propertyType = objectType
+ .getProperties()
+ .find(prop => prop.name === propertyName);
+ if (propertyType &&
+ tsutils.isSymbolFlagSet(propertyType, ts.SymbolFlags.Optional)) {
+ return true;
}
return false;
diff --git a/dist/rules/no-unsafe-return.js b/dist/rules/no-unsafe-return.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/no-unsafe-return.js
+++ b/dist/rules/no-unsafe-return.js
@@ -135,5 +135,6 @@
});
}
- for (const signature of functionType.getCallSignatures()) {
+ const signature = functionType.getCallSignatures().at(0);
+ if (signature) {
const functionReturnType = signature.getReturnType();
const result = (0, util_1.isUnsafeAssignment)(returnNodeType, functionReturnType, checker, returnNode);
diff --git a/dist/rules/no-unused-vars.js b/dist/rules/no-unused-vars.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/no-unused-vars.js
+++ b/dist/rules/no-unused-vars.js
@@ -181,10 +181,8 @@
}
}
- else {
- // skip ignored variables
- if (def.name.type === utils_1.AST_NODE_TYPES.Identifier &&
- options.varsIgnorePattern?.test(def.name.name)) {
- continue;
- }
+ // skip ignored variables
+ else if (def.name.type === utils_1.AST_NODE_TYPES.Identifier &&
+ options.varsIgnorePattern?.test(def.name.name)) {
+ continue;
}
if (hasRestSpreadSibling(variable)) {
diff --git a/dist/rules/prefer-find.js b/dist/rules/prefer-find.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/prefer-find.js
+++ b/dist/rules/prefer-find.js
@@ -211,5 +211,5 @@
// Note: we're always looking for array member access to be "computed",
// i.e. `filteredResults[0]`, since `filteredResults.0` isn't a thing.
- ['MemberExpression[computed=true]'](node) {
+ 'MemberExpression[computed=true]'(node) {
if (isMemberAccessOfZero(node)) {
const object = node.object;
diff --git a/dist/rules/return-await.js b/dist/rules/return-await.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/return-await.js
+++ b/dist/rules/return-await.js
@@ -50,5 +50,10 @@
{
type: 'string',
- enum: ['in-try-catch', 'always', 'never'],
+ enum: [
+ 'in-try-catch',
+ 'always',
+ 'never',
+ 'error-handling-correctness-only',
+ ],
},
],
@@ -219,43 +224,14 @@
const type = checker.getTypeAtLocation(child);
const isThenable = tsutils.isThenableType(checker, expression, type);
- if (!isAwait && !isThenable) {
- return;
- }
- if (isAwait && !isThenable) {
- // any/unknown could be thenable; do not auto-fix
- const useAutoFix = !((0, util_1.isTypeAnyType)(type) || (0, util_1.isTypeUnknownType)(type));
- context.report({
- messageId: 'nonPromiseAwait',
- node,
- ...fixOrSuggest(useAutoFix, {
- messageId: 'nonPromiseAwait',
- fix: fixer => removeAwait(fixer, node),
- }),
- });
- return;
- }
- const affectsErrorHandling = affectsExplicitErrorHandling(expression) ||
- affectsExplicitResourceManagement(node);
- const useAutoFix = !affectsErrorHandling;
- if (option === 'always') {
- if (!isAwait && isThenable) {
- context.report({
- messageId: 'requiredPromiseAwait',
- node,
- ...fixOrSuggest(useAutoFix, {
- messageId: 'requiredPromiseAwaitSuggestion',
- fix: fixer => insertAwait(fixer, node, isHigherPrecedenceThanAwait(expression)),
- }),
- });
- }
- return;
- }
- if (option === 'never') {
+ // handle awaited _non_thenables
+ if (!isThenable) {
if (isAwait) {
+ // any/unknown could be thenable; do not auto-fix
+ const useAutoFix = !((0, util_1.isTypeAnyType)(type) || (0, util_1.isTypeUnknownType)(type));
context.report({
- messageId: 'disallowedPromiseAwait',
+ messageId: 'nonPromiseAwait',
node,
...fixOrSuggest(useAutoFix, {
- messageId: 'disallowedPromiseAwaitSuggestion',
+ messageId: 'nonPromiseAwait',
fix: fixer => removeAwait(fixer, node),
}),
@@ -264,26 +240,39 @@
return;
}
- if (option === 'in-try-catch') {
- if (isAwait && !affectsErrorHandling) {
- context.report({
- messageId: 'disallowedPromiseAwait',
- node,
- ...fixOrSuggest(useAutoFix, {
- messageId: 'disallowedPromiseAwaitSuggestion',
- fix: fixer => removeAwait(fixer, node),
- }),
- });
- }
- else if (!isAwait && affectsErrorHandling) {
- context.report({
- messageId: 'requiredPromiseAwait',
- node,
- ...fixOrSuggest(useAutoFix, {
- messageId: 'requiredPromiseAwaitSuggestion',
- fix: fixer => insertAwait(fixer, node, isHigherPrecedenceThanAwait(expression)),
- }),
- });
- }
- return;
+ // At this point it's definitely a thenable.
+ const affectsErrorHandling = affectsExplicitErrorHandling(expression) ||
+ affectsExplicitResourceManagement(node);
+ const useAutoFix = !affectsErrorHandling;
+ const ruleConfiguration = getConfiguration(option);
+ const shouldAwaitInCurrentContext = affectsErrorHandling
+ ? ruleConfiguration.errorHandlingContext
+ : ruleConfiguration.ordinaryContext;
+ switch (shouldAwaitInCurrentContext) {
+ case "don't-care":
+ break;
+ case 'await':
+ if (!isAwait) {
+ context.report({
+ messageId: 'requiredPromiseAwait',
+ node,
+ ...fixOrSuggest(useAutoFix, {
+ messageId: 'requiredPromiseAwaitSuggestion',
+ fix: fixer => insertAwait(fixer, node, isHigherPrecedenceThanAwait(expression)),
+ }),
+ });
+ }
+ break;
+ case 'no-await':
+ if (isAwait) {
+ context.report({
+ messageId: 'disallowedPromiseAwait',
+ node,
+ ...fixOrSuggest(useAutoFix, {
+ messageId: 'disallowedPromiseAwaitSuggestion',
+ fix: fixer => removeAwait(fixer, node),
+ }),
+ });
+ }
+ break;
}
}
@@ -326,4 +315,28 @@
},
});
+function getConfiguration(option) {
+ switch (option) {
+ case 'always':
+ return {
+ ordinaryContext: 'await',
+ errorHandlingContext: 'await',
+ };
+ case 'never':
+ return {
+ ordinaryContext: 'no-await',
+ errorHandlingContext: 'no-await',
+ };
+ case 'error-handling-correctness-only':
+ return {
+ ordinaryContext: "don't-care",
+ errorHandlingContext: 'await',
+ };
+ case 'in-try-catch':
+ return {
+ ordinaryContext: 'no-await',
+ errorHandlingContext: 'await',
+ };
+ }
+}
function fixOrSuggest(useFix, suggestion) {
return useFix ? { fix: suggestion.fix } : { suggest: [suggestion] };
diff --git a/dist/rules/strict-boolean-expressions.js b/dist/rules/strict-boolean-expressions.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/strict-boolean-expressions.js
+++ b/dist/rules/strict-boolean-expressions.js
@@ -131,4 +131,5 @@
'LogicalExpression[operator!="??"]': traverseLogicalExpression,
'UnaryExpression[operator="!"]': traverseUnaryLogicalExpression,
+ CallExpression: traverseCallExpression,
};
/**
@@ -159,8 +160,107 @@
traverseNode(node.left, true);
// if the logical expression is used for control flow,
- // then it's right argument is used for it's side effects only
+ // then its right argument is used for its side effects only
traverseNode(node.right, isCondition);
}
+ function traverseCallExpression(node) {
+ const assertedArgument = findAssertedArgument(node);
+ if (assertedArgument != null) {
+ traverseNode(assertedArgument, true);
+ }
+ }
/**
+ * Inspect a call expression to see if it's a call to an assertion function.
+ * If it is, return the node of the argument that is asserted.
+ */
+ function findAssertedArgument(node) {
+ // If the call looks like `assert(expr1, expr2, ...c, d, e, f)`, then we can
+ // only care if `expr1` or `expr2` is asserted, since anything that happens
+ // within or after a spread argument is out of scope to reason about.
+ const checkableArguments = [];
+ for (const argument of node.arguments) {
+ if (argument.type === utils_1.AST_NODE_TYPES.SpreadElement) {
+ break;
+ }
+ checkableArguments.push(argument);
+ }
+ // nothing to do
+ if (checkableArguments.length === 0) {
+ return undefined;
+ }
+ // Game plan: we're going to check the type of the callee. If it has call
+ // signatures and they _ALL_ agree that they assert on a parameter at the
+ // _SAME_ position, we'll consider the argument in that position to be an
+ // asserted argument.
+ const calleeType = (0, util_1.getConstrainedTypeAtLocation)(services, node.callee);
+ const callSignatures = tsutils.getCallSignaturesOfType(calleeType);
+ let assertedParameterIndex = undefined;
+ for (const signature of callSignatures) {
+ const declaration = signature.getDeclaration();
+ const returnTypeAnnotation = declaration.type;
+ // Be sure we're dealing with a truthiness assertion function.
+ if (!(returnTypeAnnotation != null &&
+ ts.isTypePredicateNode(returnTypeAnnotation) &&
+ // This eliminates things like `x is string` and `asserts x is T`
+ // leaving us with just the `asserts x` cases.
+ returnTypeAnnotation.type == null &&
+ // I think this is redundant but, still, it needs to be true
+ returnTypeAnnotation.assertsModifier != null)) {
+ return undefined;
+ }
+ const assertionTarget = returnTypeAnnotation.parameterName;
+ if (assertionTarget.kind !== ts.SyntaxKind.Identifier) {
+ // This can happen when asserting on `this`. Ignore!
+ return undefined;
+ }
+ // If the first parameter is `this`, skip it, so that our index matches
+ // the index of the argument at the call site.
+ const firstParameter = declaration.parameters.at(0);
+ const nonThisParameters = firstParameter?.name.kind === ts.SyntaxKind.Identifier &&
+ firstParameter.name.text === 'this'
+ ? declaration.parameters.slice(1)
+ : declaration.parameters;
+ // Don't bother inspecting parameters past the number of
+ // arguments we have at the call site.
+ const checkableNonThisParameters = nonThisParameters.slice(0, checkableArguments.length);
+ let assertedParameterIndexForThisSignature;
+ for (const [index, parameter] of checkableNonThisParameters.entries()) {
+ if (parameter.dotDotDotToken != null) {
+ // Cannot assert a rest parameter, and can't have a rest parameter
+ // before the asserted parameter. It's not only a TS error, it's
+ // not something we can logically make sense of, so give up here.
+ return undefined;
+ }
+ if (parameter.name.kind !== ts.SyntaxKind.Identifier) {
+ // Only identifiers are valid for assertion targets, so skip over
+ // anything like `{ destructuring: parameter }: T`
+ continue;
+ }
+ // we've found a match between the "target"s in
+ // `function asserts(target: T): asserts target;`
+ if (parameter.name.text === assertionTarget.text) {
+ assertedParameterIndexForThisSignature = index;
+ break;
+ }
+ }
+ if (assertedParameterIndexForThisSignature == null) {
+ // Didn't find an assertion target in this signature that could match
+ // the call site.
+ return undefined;
+ }
+ if (assertedParameterIndex != null &&
+ assertedParameterIndex !== assertedParameterIndexForThisSignature) {
+ // The asserted parameter we found for this signature didn't match
+ // previous signatures.
+ return undefined;
+ }
+ assertedParameterIndex = assertedParameterIndexForThisSignature;
+ }
+ // Didn't find a unique assertion index.
+ if (assertedParameterIndex == null) {
+ return undefined;
+ }
+ return checkableArguments[assertedParameterIndex];
+ }
+ /**
* Inspects any node.
*
@@ -727,7 +827,5 @@
// intrinsicName set "true" and "false" each because of ts-api-utils.unionTypeParts()
if (booleans.length === 1) {
- tsutils.isTrueLiteralType(booleans[0])
- ? variantTypes.add('truthy boolean')
- : variantTypes.add('boolean');
+ variantTypes.add(tsutils.isTrueLiteralType(booleans[0]) ? 'truthy boolean' : 'boolean');
}
else if (booleans.length === 2) {
diff --git a/dist/rules/unified-signatures.js b/dist/rules/unified-signatures.js
index v7.16.1..v7.17.0 100644
--- a/dist/rules/unified-signatures.js
+++ b/dist/rules/unified-signatures.js
@@ -292,5 +292,7 @@
};
function createScope(parent, typeParameters) {
- currentScope && scopes.push(currentScope);
+ if (currentScope) {
+ scopes.push(currentScope);
+ }
currentScope = {
overloads: new Map(),
diff --git a/package.json b/package.json
index v7.16.1..v7.17.0 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
"name": "@typescript-eslint/eslint-plugin",
- "version": "7.16.1",
+ "version": "7.17.0",
"description": "TypeScript plugin for ESLint",
"files": [
@@ -61,8 +61,8 @@
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
- "@typescript-eslint/scope-manager": "7.16.1",
- "@typescript-eslint/type-utils": "7.16.1",
- "@typescript-eslint/utils": "7.16.1",
- "@typescript-eslint/visitor-keys": "7.16.1",
+ "@typescript-eslint/scope-manager": "7.17.0",
+ "@typescript-eslint/type-utils": "7.17.0",
+ "@typescript-eslint/utils": "7.17.0",
+ "@typescript-eslint/visitor-keys": "7.17.0",
"graphemer": "^1.4.0",
"ignore": "^5.3.1",
@@ -75,6 +75,6 @@
"@types/mdast": "^4.0.3",
"@types/natural-compare": "*",
- "@typescript-eslint/rule-schema-to-typescript-types": "7.16.1",
- "@typescript-eslint/rule-tester": "7.16.1",
+ "@typescript-eslint/rule-schema-to-typescript-types": "7.17.0",
+ "@typescript-eslint/rule-tester": "7.17.0",
"ajv": "^6.12.6",
"cross-env": "^7.0.3",
diff --git a/dist/configs/all.js.map b/dist/configs/all.js.map
index v7.16.1..v7.17.0 100644
--- a/dist/configs/all.js.map
+++ b/dist/configs/all.js.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"all.js","sourceRoot":"","sources":["../../src/configs/all.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,iDAAiD;AACjD,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AAItD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,iDAAiD,EAAE,OAAO;QAC1D,+BAA+B,EAAE,OAAO;QACxC,mCAAmC,EAAE,OAAO;QAC5C,mCAAmC,EAAE,OAAO;QAC5C,uCAAuC,EAAE,OAAO;QAChD,8BAA8B,EAAE,OAAO;QACvC,iDAAiD,EAAE,OAAO;QAC1D,wBAAwB,EAAE,KAAK;QAC/B,2CAA2C,EAAE,OAAO;QACpD,oDAAoD,EAAE,OAAO;QAC7D,oDAAoD,EAAE,OAAO;QAC7D,mBAAmB,EAAE,KAAK;QAC1B,sCAAsC,EAAE,OAAO;QAC/C,+CAA+C,EAAE,OAAO;QACxD,gDAAgD,EAAE,OAAO;QACzD,4CAA4C,EAAE,OAAO;QACrD,4CAA4C,EAAE,OAAO;QACrD,oBAAoB,EAAE,KAAK;QAC3B,uCAAuC,EAAE,OAAO;QAChD,cAAc,EAAE,KAAK;QACrB,iCAAiC,EAAE,OAAO;QAC1C,kDAAkD,EAAE,OAAO;QAC3D,kDAAkD,EAAE,OAAO;QAC3D,mDAAmD,EAAE,OAAO;QAC5D,mBAAmB,EAAE,KAAK;QAC1B,sCAAsC,EAAE,OAAO;QAC/C,YAAY,EAAE,KAAK;QACnB,+BAA+B,EAAE,OAAO;QACxC,oCAAoC,EAAE,OAAO;QAC7C,2CAA2C,EAAE,OAAO;QACpD,s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AAE,OAAO;QACtD,8CAA8C,EAAE,OAAO;QACvD,0CAA0C,EAAE,OAAO;QACnD,8BAA8B,EAAE,KAAK;QACrC,iDAAiD,EAAE,OAAO;QAC1D,oCAAoC,EAAE,OAAO;QAC7C,oDAAoD,EAAE,OAAO;QAC7D,iDAAiD,EAAE,OAAO;QAC1D,uCAAuC,EAAE,OAAO;QAChD,4CAA4C,EAAE,OAAO;QACrD,mDAAmD,EAAE,OAAO;QAC5D,2CAA2C,EAAE,OAAO;QACpD,+CAA+C,EAAE,OAAO;QACxD,eAAe,EAAE,KAAK;QACtB,kCAAkC,EAAE,OAAO;QAC3C,2CAA2C,EAAE,OAAO;QACpD,kDAAkD,EAAE,OAAO;QAC3D,iBAAiB,EAAE,KAAK;QACxB,iCAAiC,EAAE,OAAO;QAC1C,+CAA+C,EAAE,OAAO;QACxD,gDAAgD,EAAE,OAAO;QACzD,2CAA2C,EAAE,OAAO;QACpD,4BAA4B,EAAE,OAAO;QACrC,mCAAmC,EAAE,OAAO;QAC5C,uCAAuC,EAAE,OAAO;QAChD,2DAA2D,EAAE,OAAO;KACrE;CAC6B,CAAC"}
\ No newline at end of file
+{"version":3,"file":"all.js","sourceRoot":"","sources":["../../src/configs/all.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,iDAAiD;AACjD,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AAItD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,iDAAiD,EAAE,OAAO;QAC1D,+BAA+B,EAAE,OAAO;QACxC,mCAAmC,EAAE,OAAO;QAC5C,mCAAmC,EAAE,OAAO;QAC5C,uCAAuC,EAAE,OAAO;QAChD,8BAA8B,EAAE,OAAO;QACvC,iDAAiD,EAAE,OAAO;QAC1D,wBAAwB,EAAE,KAAK;QAC/B,2CAA2C,EAAE,OAAO;QACpD,oDAAoD,EAAE,OAAO;QAC7D,oDAAoD,E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AAO;QAChD,2DAA2D,EAAE,OAAO;KACrE;CAC6B,CAAC"}
\ No newline at end of file
diff --git a/dist/rules/prefer-optional-chain-utils/analyzeChain.js.map b/dist/rules/prefer-optional-chain-utils/analyzeChain.js.map
index v7.16.1..v7.17.0 100644
--- a/dist/rules/prefer-optional-chain-utils/analyzeChain.js.map
+++ b/dist/rules/prefer-optional-chain-utils/analyzeChain.js.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"analyzeChain.js","sourceRoot":"","sources":["../../../src/rules/prefer-optional-chain-utils/analyzeChain.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsdA,oCAyHC;AA3kBD,oDAA0D;AAO1D,+CAA8C;AAC9C,+CAAiC;AAEjC,qCAOoB;AACpB,mEAAgE;AAChE,iDAAoE;AAQpE,SAAS,YAAY,CACnB,cAAiD,EACjD,IAAmB,EACnB,UAAwB;IAExB,MAAM,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;IACtE,MAAM,KAAK,GAAG,IAAA,6BAAc,EAAC,cAAc,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IACrE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAA,oBAAa,EAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC;YAClC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAYD,MAAM,sBAAsB,GAAoB,CAC9C,cAAc,EACd,OAAO,EACP,KAAK,EACL,KAAK,EACL,EAAE;IACF,QAAQ,OAAO,CAAC,cAAc,EAAE,CAAC;QAC/B,kDAAkC,CAAC,CAAC,CAAC;YACnC,MAAM,WAAW,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YACxC,IACE,WAAW,EAAE,cAAc;mFACe;gB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AAQ,IAAI,KAAK,EAAE,CAAC;IAC3C,CAAC;SAAM,IAAI,WAAW,CAAC,cAAc,wDAAqC,EAAE,CAAC;QAC3E,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC1B,CAA (too long so truncated)
Command detailsnpm diff --diff=@typescript-eslint/eslint-plugin@7.16.1 --diff=@typescript-eslint/eslint-plugin@7.17.0 --diff-unified=2 See also the Reported by ybiquitous/npm-diff-action@v1.6.0 (Node.js 22.5.1 and npm 10.8.2) |
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 7.16.1 to 7.17.0Release notes
Sourced from
@typescript-eslint/eslint-plugin
's releases.Changelog
Sourced from
@typescript-eslint/eslint-plugin
's changelog.Commits
05c9cb8
chore(release): publish 7.17.0f6c719f
fix(eslint-plugin): [no-unnecessary-condition] false positive on optional pri...6647f7e
chore: enable no-unreachable-loop (#9540)58be99f
chore: enable prefer-object-spread (#9541)5d895b7
chore: enable@typescript-eslint/no-unused-expressions
(#9542)d8c539d
chore: enable no-useless-concat (#9550)f043f30
fix(eslint-plugin): [strict-boolean-expressions] consider assertion function ...0108e9c
chore: enable no-lonely-if (#9547)970f3f1
feat(eslint-plugin): [return-await] add option to report in error-handling sc...dd965a4
feat(eslint-plugin): backport no-unsafe-function type, no-wrapper-object-type...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