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
Do not print trailing commas in arrow function type parameter lists in ts
code blocks
#15286
Conversation
src/language-markdown/embed.js
Outdated
// should be printed depends on whether it is `*.ts` or `*.tsx`. | ||
// https://github.com/prettier/prettier/issues/15282 | ||
if (node.lang === "ts" || node.lang === "tsx") { | ||
newOptions.filepath = `dummy.${node.lang}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should we print this?
```typescript
const foo = <T>() => {}
```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as for ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
This link is broken, can you fix it? https://typescript-eslint.io/packages/parser/#jsx |
After second thought, maybe we should pretent it's |
If you agree, we should update this line instead
|
…n `ts` code blocks (prettier#15286) * Remove trailing comma for `ts` code blocks * Add changelog * Support `typescript` * Update link * Update tests
Description
Fixes #15282
Checklist
changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨