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

deprecation of jsx-space-before-closing #967

Closed
remitbri opened this issue Nov 20, 2016 · 2 comments
Closed

deprecation of jsx-space-before-closing #967

remitbri opened this issue Nov 20, 2016 · 2 comments
Milestone

Comments

@remitbri
Copy link

I'm using eslint@3.10.2 and eslint-plugin-react@6.7.1
It's possible to write a configuration such as

{
  "react/jsx-space-before-closing" : [ "error", "never" ],
  "react/jsx-tag-spacing" : [ "error", {
    closingSlash : "never",
    beforeSelfClosing : "always",
    afterOpening : "never",
  }]
}

meaning code such as

const test = () => (
  <div>
    <br/>
    <br />
  </div>
)

gets an error for both having (2nd br) and not having (1st br) a space before the closing bracket.
The jsx-space-before-closing rule should be deprecated since jsx-tag-spacing handles its scope and more.

@ljharb ljharb added this to the 7.0.0 milestone Nov 20, 2016
@ljharb
Copy link
Member

ljharb commented Nov 20, 2016

That's exactly the plan. #693 (comment)

@remitbri
Copy link
Author

Cool :)

yannickcr added a commit that referenced this issue Apr 23, 2017
Deprecate jsx-space-before-closing rule (fixes #967)
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