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

feat(plugin): allow some one-line arrow functions #172

Merged
merged 1 commit into from Apr 18, 2023

Conversation

zanminkian
Copy link
Contributor

Description

Linked Issues

Additional context

@@ -40,6 +40,11 @@ export default createEslintRule<Options, MessageIds>({
return
if (declaration.id.typeAnnotation)
return
if (
declaration.init.body.type !== 'BlockStatement'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const fun = () => { return 'abc' }

Code above (block statement) will be formatted.

@antfu antfu merged commit 506d17c into antfu:main Apr 18, 2023
@antfu
Copy link
Owner

antfu commented Apr 18, 2023

Exactly! Thanks

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

Successfully merging this pull request may close these issues.

None yet

2 participants