Skip to content

Single line comment inside braces is not considered #18357

@Fox32

Description

@Fox32

Prettier 3.7.1
Playground link

--parser babel-ts

Input:

export type XXX = {
    // tbd
}

Output:

export type XXX = { // tbd };

Expected output:

export type XXX = {
    // tbd
}

Why?

The comment produces invalid code.

Metadata

Metadata

Assignees

Labels

lang: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