Closed
Description
eslint-plugin-react 7.9.1
If the content of a tag contains only text, extra blank lines are inserted after the text (and the indentation is not correct). If the interior is a jsx expression, the output is correct.
<div>
<MyComponent>a</MyComponent>
<MyOther>{a}</MyOther>
</div>
results in:
<div>
<MyComponent>
a
</MyComponent>
<MyOther>
{a}
</MyOther>
</div>
.eslintrc:
{
"parser": "babel-eslint",
"plugins": [
"react",
"babel"
],
"rules": {
"indent": [1, "tab"],
"react/jsx-one-expression-per-line": 1
}
}
Note: If you leave out indent
it does not insert the extra spaces following the string content but does not indent any of the fixed code.