Skip to content

Inline single-line comments next to parentheses are being moved incorrectly #5973

@rsimha

Description

@rsimha

Here's a bug we're seeing while trying to adopt prettier for the AMP Project:

This code...

foo/*OK*/(bar);

... is being changed to...

foo(/*OK*/ bar);

... thereby defeating the purpose of the /*OK*/, which we use to whitelist usage of foo.

Playground link: here

For context: #1013 (comment) and ampproject/amphtml#21212 (comment)

/cc @vjeux

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions