Skip to content

Bug: jsx-closing-bracket-location autofix removes whitespace character #1501

Open
@TSMMark

Description

@TSMMark
<div>
  foo </div>

Renders a space in HTML: <div>foo </div>

After fix is applied, it becomes:

<div>
  foo 
</div>

Note that there IS a space after foo in the output, however this space will typically be linted off by no-trailing-spaces rule, and even if it's not linted out of your source code, it will be ignored by React's JSX parser, meaning the output HTML will be <div>foo</div> 100% of the time.

tl;dr

<div>foo </div> becomes <div>foo</div>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions