Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--fix removes curly bracket space after html #2441

Closed
RyanPWalker opened this issue Oct 3, 2019 · 1 comment
Closed

--fix removes curly bracket space after html #2441

RyanPWalker opened this issue Oct 3, 2019 · 1 comment

Comments

@RyanPWalker
Copy link

RyanPWalker commented Oct 3, 2019

I just upgraded from "eslint": "^6.1.0", "eslint-plugin-react": "^7.14.2" to "eslint": "^6.5.1", "eslint-plugin-react": "^7.15.1".

Running yarn eslint ./src --fix removes any instance of a {' '} since a new line now creates a space in React jsx like:

<div>
    Hello
    {' '}
    World
</div>
> Hello World

--fix now changes to:

<div>
    Hello
    World
</div>
> Hello World

But if I have html within that, it removes the space and the newline does not create a space. For example:

<div>
    Hello<sup>*</sup>
    {' '}
    World
</div>
> Hello* World

--fix now changes to:

<div>
    Hello<sup>*</sup>
    World
</div>
> Hello*World      (missing space)

I suspect this breaking change caused this #2422

@ljharb
Copy link
Member

ljharb commented Oct 3, 2019

This will be fixed in #2437.

@ljharb ljharb closed this as completed Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants