fix(formatter): wrongly added an indentation for an union type when there is a leading line comment#17252
Merged
graphite-app[bot] merged 1 commit intomainfrom Dec 22, 2025
Conversation
This was referenced Dec 22, 2025
Member
Author
CodSpeed Performance ReportMerging #17252 will not alter performanceComparing Summary
Footnotes
|
This was referenced Dec 22, 2025
Contributor
Merge activity
|
…here is a leading line comment (#17252) close: #16902 The case below's output is incorrect, but it's not related to this issue, and was fixed in #17254 Input ```ts console.log( < // comment string | number | undefined >0 ); ``` Expect output: ```ts console.log( < // comment string | number | undefined >0 ); ``` Actual output ```ts console.log(< // comment string | number | undefined >0); ```
5dfff90 to
9e4ab39
Compare
39a5ee2 to
def4ec1
Compare
graphite-app bot
pushed a commit
that referenced
this pull request
Dec 22, 2025
…will break (#17254) Fix an incorrect output that was found in #17252 (comment) Biome has the same incorrect output and ended up fixing it by aligning the [Prettier implementation](https://github.com/prettier/prettier/blob/0273e33fc691e28e4ab3f3c8ee86918b65cf823d/src/language-js/print/call-arguments.js#L193-L195).
Base automatically changed from
12-22-test_formatter_move_react_hooks_related_tests_to_a_same_folder
to
main
December 22, 2025 09:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

close: #16902
The case below's output is incorrect, but it's not related to this issue, and was fixed in #17254
Input
Expect output:
Actual output