Skip to content

Unstable comment in while #5245

@alexander-akait

Description

@alexander-akait

Prettier 1.14.3
Playground link

--parser babylon

Input:

while(
    true
    // Comment
) {}

Output:

while (true) // Comment
{}

Second Output:

while (
  true // Comment
) {}

Expected behavior:

while(
    true
    // Comment
) {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:commentsIssues with how Prettier prints commentsdifficulty:easyIssues that should be easy to fix. Resolve me on the train to work!lang:javascriptIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions