no-arrow-function-lifecycle
: implicit returns cause "fix" Parsing error
#3145
Labels
no-arrow-function-lifecycle
: implicit returns cause "fix" Parsing error
#3145
I'm very excited to have this great new rule! Thank you @ngtan and @ljharb!
Unfortunately I've encountered a bug in the auto-fix code. The following test case demonstrates an error:
The rule fix only really acts to modify the
()
part of theArrowFunctionExpression
. It does not touch the rest. In this case thebody
is anExpression
and needs to be transformed into aBlockStatement
+ReturnStatement
.I'd take a crack at this but my eslint ast modification is pretty weak (have some experience in jscodeshift)
The text was updated successfully, but these errors were encountered: