Skip to content

Incorrect formatting when running ---fix for JSX with missing parentheses (jsx-wrap-multilines) #1382

Closed
@jakefb

Description

What version of this package are you using?

^14.0.0

What operating system, Node.js, and npm version?

macOS 10.14.5
node v12.8.0
npm 6.10.2

What happened?

It appears that jsx-wrap-multilines #710 has been implemented in standard v14, however when I run standard --fix the following happens.

Original code:

const Component = () =>
  <div>
    <p>Some text</p>
  </div>

export { Component as default }

Formatted code:

const Component = () => (
<div>
    <p>Some text</p>
  </div>
)export { Component as default }

What did you expect to happen?

I expected the export statement to be on a newline. Something strange is going on with the JSX formatting as well.

Are you willing to submit a pull request to fix this bug?

I could take a look into it and see if I can find what's causing the issue.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions