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

challenge(formatter): allow require to split lines #762

Merged
merged 1 commit into from Nov 17, 2023

Conversation

faultyserver
Copy link
Contributor

Summary

Fixes:

The implementation logic is taken from the same in Prettier prettier/prettier#15256, only checking if the require is called with a single string literal or multiple arguments to group them together. Any other sole argument to the function is allowed to break instead.

Test Plan

Updated snapshots now match and the difference snap is removed.

@github-actions github-actions bot added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages labels Nov 17, 2023
@Conaclos Conaclos changed the title challenge(formatter): Allow require to split lines challenge(formatter): allow require to split lines Nov 17, 2023
@Conaclos Conaclos merged commit d7bee75 into biomejs:main Nov 17, 2023
12 checks passed
@faultyserver faultyserver deleted the challenge/require-require branch November 17, 2023 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants