Repository navigation
Print trailing comma for type parameters - #10109
Merged
sosukesuzuki merged 8 commits intoJan 28, 2021
Merged
sosukesuzuki merged 8 commits into
sosukesuzuki merged 8 commits into
Conversation
Member
|
TS 2.7 was released 3 years ago. I don't think we need a major version for this. |
thorn0
requested changes
Jan 26, 2021
thorn0
left a comment
Member
There was a problem hiding this comment.
This logic relies on the file extension (isTSXFile), so I can't reproduce this on the playground:
test-tsx.tsx:
const f = <Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, >() => 1$ prettier test-tsx.tsx --trailing-comma all
const f = <
Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt,,
>() => 1;See also #3662 (comment)
BTW, this also means that Prettier has been outputting code with trailing commas in type parameters for a while already, at least for TSX. so this change is definitely safe for a non-major version.
sosukesuzuki
force-pushed
the
print-trailing-comma-for-type-parameter
branch
from
January 27, 2021 08:28
f465e6c to
d046790
Compare
thorn0
reviewed
Jan 27, 2021
thorn0
reviewed
Jan 27, 2021
thorn0
approved these changes
Jan 27, 2021
fisker
approved these changes
Jan 28, 2021
2 tasks done
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Fixes #3662.
I think we can do this at next major.
Checklist
changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨