jsx-eslint/eslint-plugin-react

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

Open

#1,501 创建于 2017年10月26日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)JavaScript (8,630 star) (2,797 fork)batch import
bughelp wanted

描述

<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>

贡献者指南

Bug: jsx-closing-bracket-location autofix removes whitespace character · jsx-eslint/eslint-plugin-react#1501 | Good First Issue