Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments in program reordered #18847

@fisker

Description

@fisker

Prettier pr-18846
Playground link

--parser babel

Input:

foo; // first
// second
;// third

function x() {
}

Output:

foo; // first
// third

// second
function x() {}

Expected output:

foo; // first
// second
// third

function x() {
}

Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:commentsIssues with how Prettier prints commentslang:javascriptIssues affecting JS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions