Skip to content

Commit

Permalink
More removals
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Mar 13, 2023
1 parent f8a6acf commit 811ba41
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions packages/eslint-plugin/src/rules/no-misused-promises.ts
Expand Up @@ -240,12 +240,10 @@ export default util.createRule<Options, MessageId>({
return;
}

if (returnsThenable(checker, tsNode.right)) {
context.report({
messageId: 'voidReturnVariable',
node: node.right,
});
}
context.report({
messageId: 'voidReturnVariable',
node: node.right,
});
}

function checkVariableDeclaration(node: TSESTree.VariableDeclarator): void {
Expand Down Expand Up @@ -345,9 +343,6 @@ export default util.createRule<Options, MessageId>({
if (tsNode.expression === undefined || node.argument == null) {
return;
}
if (!returnsThenable(checker, tsNode.expression)) {
return;
}
const contextualType = checker.getContextualType(tsNode.expression);
if (
contextualType !== undefined &&
Expand All @@ -371,9 +366,6 @@ export default util.createRule<Options, MessageId>({
) {
return;
}
if (!returnsThenable(checker, value.expression)) {
return;
}
const contextualType = checker.getContextualType(value);
if (
contextualType !== undefined &&
Expand Down

0 comments on commit 811ba41

Please sign in to comment.