Omit braces around arrow function bodies containing only a return

Proprietary

Converts arrow functions whose block body contains only a single return statement to a concise expression body. For example, () => { return x; } becomes () => x. Returned object literals and sequence expressions are wrapped in parentheses to keep the result parseable. Replicates the autofix of the ESLint rule arrow-body-style under its default options.

org.openrewrite.javascript.cleanup.ArrowBodyStyle
mod run . --recipe=org.openrewrite.javascript.cleanup.ArrowBodyStyle

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.