Eslint-plugin-react: [jsx-child-element-spacing] Improve error location

Created on 26 Jan 2018  路  3Comments  路  Source: yannickcr/eslint-plugin-react

With rule react/jsx-child-element-spacing, the error location is not very helpful when there is ambiguous spacing before the inline element.

Current:

<div> {/* Error is at the end of this element */}
  Some
  text
  <a href="/">
    link
  </a>
</div>

Expected:

<div>
  Some
  text
  <a href="/"> {/* Error should be at the start of this element */}
    link
  </a>
</div>
enhancement help wanted

Most helpful comment

All 3 comments

cc @pfhayes

Thanks @pfhayes!

Was this page helpful?
0 / 5 - 0 ratings