Skip to content

Semicolon before leading line comment unstable #5022

@xixixao

Description

@xixixao

Unstable means that Prettier produces a different result on second run. First run:

Prettier 1.14.2
Playground link

--parser babylon
--no-semi

Input:

x
;/* comment */ (error: any).response = response

Output:

x
/* comment */ ;(error: any).response = response

Second Output:

x
/* comment */
;(error: any).response = response

Expected behavior:
Comment should stay on the same line, or it should have been shifted in the first run. Slightly related issue in #1510.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions