-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Trailing commas for type parameters in Flow with --trailing-comma=es5 #3722
Labels
lang:flow
Issues affecting Flow-specific constructs (not general JS issues)
locked-due-to-inactivity
Please open a new issue and fill out the template instead of commenting.
status:needs discussion
Issues needing discussion and a decision to be made before action can be taken
Comments
suchipi
added
status:needs discussion
Issues needing discussion and a decision to be made before action can be taken
lang:typescript
Issues affecting TypeScript-specific constructs (not general JS issues)
lang:javascript
Issues affecting JS
lang:flow
Issues affecting Flow-specific constructs (not general JS issues)
labels
Jan 11, 2018
Following that logic we could consider that |
Yeah I guess that's kinda weird... I'm looking at it from the flow perspective, though. |
@suchipi looks like an oversight to me. Feel free to fix it :) |
From memory, older versions of TS don't support trailing commas here, I think it was intentional. Might want to double check |
thorn0
changed the title
Using trailingComma: es5 omits commas from type parameter list
Trailing commas for type parameters in Flow with --trailing-comma=es5
Jan 28, 2021
thorn0
removed
lang:javascript
Issues affecting JS
lang:typescript
Issues affecting TypeScript-specific constructs (not general JS issues)
labels
Jan 28, 2021
4 tasks
Fixed by #14085 |
github-actions
bot
added
the
locked-due-to-inactivity
Please open a new issue and fill out the template instead of commenting.
label
Nov 27, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
lang:flow
Issues affecting Flow-specific constructs (not general JS issues)
locked-due-to-inactivity
Please open a new issue and fill out the template instead of commenting.
status:needs discussion
Issues needing discussion and a decision to be made before action can be taken
I'm not sure if this is the correct behavior or not, but I just moved from
trailingComma: "all"
totrailingComma: "es5"
in our codebase at work, and was surprised to see these ones disappear.Prettier 1.9.2
Playground link
Input:
Output:
Prettier 1.9.2
Playground link
Input:
Output:
This affects both flow and typescript.
Seeing as type parameters aren't valid ES5 anyway, should we maybe include trailing commas there even when using
trailingComma: "es5"
?The text was updated successfully, but these errors were encountered: