Skip to content

fix(49151): formatter wrongly indent '>' after type parameters/arguments #49165

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

Merged
merged 2 commits into from
May 31, 2022

Conversation

TRCYX
Copy link
Contributor

@TRCYX TRCYX commented May 18, 2022

Fixes #49151

Before, the formatter did not consider type parameters/arguments in general as comma
separated lists, leading to wrong indentation of > after them, such as in the already formatted code

class C<
    T
    > { }

where the > should be dedented.

See the issue for more examples.

Before, the formatter did not consider these constructs as comma
separated lists in general, leading to wrong indentation of '>' after
the list.
@ghost
Copy link

ghost commented May 18, 2022

CLA assistant check
All CLA requirements met.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label May 18, 2022
@sandersn sandersn requested review from andrewbranch and gabritto May 26, 2022 21:16
@andrewbranch
Copy link
Member

I think you merge-conflicted with yourself in #49168 😄

@TRCYX
Copy link
Contributor Author

TRCYX commented May 27, 2022

Weird since the PRs actually modify different lines. This one removes the call to isCallLikeExpression. Going to fix it later when I have access to a computer.

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

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

Thanks!

@andrewbranch andrewbranch merged commit 44b9745 into microsoft:main May 31, 2022
@TRCYX TRCYX deleted the fix/49151 branch June 8, 2022 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Type parameters in generics indented incorrectly when formatted
4 participants