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 more unary and update expressions as simple arguments #757

Merged
merged 2 commits into from Nov 17, 2023

Conversation

faultyserver
Copy link
Contributor

Summary

Fixes:

This effectively matches the PR that fixed the relevant issue for the test in Prettier: prettier/prettier#13115.

+ and ~ are now considered "simple" unary operators as well, and increment and decrement operators are also considered simple. The latter differs slightly from prettier in the operand must only be an identifier and not any other kind of assignment target, but the prettier tests don't test that. This structure will allow Biome to decide how to format those kinds of operands independently in the future.

Test Plan

Prettier snapshot now matches and the diff has been removed.

@github-actions github-actions bot added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages labels Nov 17, 2023
@Conaclos Conaclos merged commit 3ee6e0b into biomejs:main Nov 17, 2023
12 checks passed
@faultyserver faultyserver deleted the challenge/simple-arguments branch November 17, 2023 21:47
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