Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule change proposal: no-useless-undefined add option to skip checking arrow function body #2191

Closed
fisker opened this issue Aug 29, 2023 · 0 comments · Fixed by #2232
Closed

Comments

@fisker
Copy link
Collaborator

fisker commented Aug 29, 2023

Sometimes it's more clear to use () => undefined than () => {},

/~https://github.com/babel/babel/pull/15547/files#diff-27084e8878ce0b72bf5cd31ec6a0a719096f981bcfa32ca71a57a0f35fb84676R64

const {foo = () => {}} = {};
const {foo = () => undefined} = {};
const {
  foo = () => {},
  bar = () => ({})
} = {};
const {
  foo = () => undefined,
  bar = () => ({})
} = {};

Suggest add option checkArrowFunctionBody: false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant