From cad02372a5f7ad7ef9606a1292758d054d79937b Mon Sep 17 00:00:00 2001 From: Rebecca Stevens Date: Thu, 11 Jul 2024 19:08:43 +1200 Subject: [PATCH] fix(no-expression-statements): arrow functions cannot be self returning --- 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)