Skip to content

Commit

Permalink
Update packages/eslint-plugin/src/rules/no-empty-function.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed May 12, 2022
1 parent e3b0d3d commit 12fff1d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/eslint-plugin/src/rules/no-empty-function.ts
Expand Up @@ -143,13 +143,12 @@ export default util.createRule<Options, MessageIds>({
function isAllowedEmptyOverrideMethod(
node: TSESTree.FunctionExpression,
): boolean {
if (isAllowedOverrideMethods && isBodyEmpty(node)) {
return (
node.parent?.type === AST_NODE_TYPES.MethodDefinition &&
node.parent.override === true
);
}
return false;
return (
isAllowedOverrideMethods &&
isBodyEmpty(node) &&
node.parent?.type === AST_NODE_TYPES.MethodDefinition &&
node.parent.override === true
);
}

return {
Expand Down

0 comments on commit 12fff1d

Please sign in to comment.