📎 Port `arrow-body-style` from eslint
Description
Port the arrow-body-style rule from eslint.
Suggested names:
-
useAbbreviatedArrowFunction -
useArrowExpression -
noArrowImmediateReturn - open to suggestions
The eslint rule has options, but we don't usually implement options on the first iteration of a rule. For this task, implement the functionality that is equivalent to the default option (which would be as-needed).
Source: https://eslint.org/docs/latest/rules/arrow-body-style
Want to contribute? Lets you know you are interested! We will assign you to the issue to prevent several people to work on the same issue. Don't worry, we can unassign you later if you are no longer interested in the issue! Read our contributing guide and analyzer contributing guide.
Hey @dyc3 I would like to take this issue! 😀
Is there another task for the "always" eslint setting (i.e., requiring you to add explicit block and return statement)? If not, it would be nice if the title of this were revised to: Port arrow-body-style: as-needed from eslint.
We could use a name such as useConsistentArrowReturn. I think that name works even if we add the option.
We could use a name such as
useConsistentArrowReturn. I think that name works even if we add the option.
I like that, and it seems to align with other rules that let you pick a potentially controversial style and enforce it, e.g., useConsistentArrayType
Any updates?
@isjavierdiaz it's been 5 months. I assume you don't have time.
Hey @dyc3 , I would like to take this. I am almost ready to land the implementation
+1