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

Rule proposal: indentation of closing jsx tag #1206

Closed
rsolomon opened this issue May 18, 2017 · 2 comments
Closed

Rule proposal: indentation of closing jsx tag #1206

rsolomon opened this issue May 18, 2017 · 2 comments

Comments

@rsolomon
Copy link
Contributor

Not to be confused with the closing bracket, I would like to enforce the location of a closing jsx tag when its children also live on a new line.

For example, the following would fail:

<MyComponent
  prop1="foo"
  prop2="bar">
  {content}</MyComponent>

The following would pass:

<MyComponent
  prop1="foo"
  prop2="bar">
  {content}
</MyComponent>

This would also pass:

<MyComponent prop1="foo">{content}</MyComponent>
@ljharb
Copy link
Member

ljharb commented May 19, 2017

This sounds great - essentially, "must be on the same line, or must be on its own line that matches the indentation of the opening tag"?

jsx-closing-tag-location, perhaps.

@ljharb
Copy link
Member

ljharb commented Jun 11, 2017

(Done in #1215)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants