Skip to content

Prettier prints a trailing comma after type argument list even if the languages is ts in markdown #15282

@so1ve

Description

@so1ve

Prettier 3.0.2
Playground link

--parser markdown

Input:

```ts
const t = <T,>() => {};
```

```tsx
const t = <T,>() => {}
```

Output:

```ts
const t = <T,>() => {};
```

```tsx
const t = <T,>() => {}
```

The second codeblock prints a trailing comma and it's the correct behavior, however the first codeblock should remove the trailing comma

Expected behavior:
The first codeblock should not have a trailing comma

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:markdownIssues affecting Markdownlang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions