Skip to content

Comments at specific positions in arrow functions are printed at unexpected positions. #14702

@seiyab

Description

@seiyab

Prettier 2.8.7
Playground link

--parser babel

Input:

(a) => //aaa
a;

() => (a, b, c /* abc */);

Output:

(
  a //aaa
) => a;

(/* abc */) => (a, b, c);

Expected behavior:

(a) => //aaa
  a;

() => (a, b, c /* abc */);

Attention
Working on this will conflict with #14633

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions