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: indent props #15

Closed
lencioni opened this issue Mar 7, 2015 · 2 comments
Closed

Rule proposal: indent props #15

lencioni opened this issue Mar 7, 2015 · 2 comments

Comments

@lencioni
Copy link
Collaborator

lencioni commented Mar 7, 2015

A rule that enforces that props on their own lines are indented properly might be nice.

Good:

<MyComponent
  firstProp="value"
  secondProp="value"
/>

Bad:

<MyComponent
firstProp="value"
secondProp="value"
/>
@andreypopp
Copy link

Shouldn't /> be indented as well?

<MyComponent
  firstProp="value"
  secondProp="value"
  />

@lencioni
Copy link
Collaborator Author

@andreypopp perhaps that should be handled by a separate rule? In my environment, Vim automatically dedents the /> as soon as I type it, and it is nice to go with the flow. Plus, I think it makes some sense if you think of these angle brackets like you would think of curlies in normal JS.

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

No branches or pull requests

3 participants