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): Handle special first-argument expansions in call arguments #777

Merged
merged 1 commit into from Nov 19, 2023

Conversation

faultyserver
Copy link
Contributor

Summary

Fixes

As a byproduct of this, the following are also fixed:

The implementation of this feels a little hacky, but that's exactly how Prettier describes their implementation too lol.

As part of this, I ended up making the SimpleArgument enum fully public so that it can be used outside of method_chain. I think that makes sense since call_arguments ends up doing a lot of the same kinds of checks, but if that's not reasonable I can figure out another way to do this instead.

Test Plan

Relevant prettier diff snapshots now match and have been deleted.

@github-actions github-actions bot added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages labels Nov 19, 2023
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Looks good. There are some merge conflicts

@Conaclos Conaclos merged commit 70c10d4 into biomejs:main Nov 19, 2023
12 checks passed
@faultyserver faultyserver deleted the challenge/first-arg-expansion branch November 19, 2023 18:46
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

3 participants