antfu / eslint-plugin-command

Comment-as-command for one-off codemod with ESLint.
https://eslint-plugin-command.antfu.me/
MIT License
170 stars 9 forks source link

feat: inline return statement of arrow function #4

Closed sxzz closed 1 month ago

sxzz commented 1 month ago

Description

Add a built-in command inline-arrow

Inline return statement of arrow function.

Triggers:

/// inline-arrow
const foo = async (msg: string): void => {
  return fn(msg)
}

Will be converted to:

const foo = async (msg: string): void => fn(msg)

Linked Issues

Additional context