Skip to content

Commit cad0237

Browse files
fix(no-expression-statements): arrow functions cannot be self returning
1 parent 711bab1 commit cad0237

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rules/no-expression-statements.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ function checkExpressionStatement(
150150
typescript !== undefined &&
151151
declaration !== undefined &&
152152
typescript.isFunctionLike(declaration) &&
153+
!typescript.isArrowFunction(declaration) &&
153154
"body" in declaration &&
154155
declaration.body !== undefined &&
155156
typescript.isBlock(declaration.body)

0 commit comments

Comments
 (0)