Skip to content

JSX comment moves to wrong place #3087

@Argo483

Description

@Argo483

Prettier 1.7.4
Playground link

--jsx-bracket-same-line

Input:

<div
  // comment
>
  {foo}
</div>

Output:

<div>
// comment
  {foo}
</div>;

Expected behavior:
same as input

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:commentsIssues with how Prettier prints commentslang:jsxIssues affecting JSX (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions