From 7217fa4130c7375de46cc261d404acf783bcba03 Mon Sep 17 00:00:00 2001 From: RebeccaStevens Date: Thu, 11 Jul 2024 07:26:03 +0000 Subject: [PATCH] fix(no-expression-statements): arrow functions cannot be self returning (#847) --- src/rules/no-expression-statements.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rules/no-expression-statements.ts b/src/rules/no-expression-statements.ts index 9926ec238..642c0f363 100644 --- a/src/rules/no-expression-statements.ts +++ b/src/rules/no-expression-statements.ts @@ -150,6 +150,7 @@ function checkExpressionStatement( typescript !== undefined && declaration !== undefined && typescript.isFunctionLike(declaration) && + !typescript.isArrowFunction(declaration) && "body" in declaration && declaration.body !== undefined && typescript.isBlock(declaration.body)