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

Revisit react/jsx-indent-props #2

Closed
matthewheck opened this issue Jan 22, 2016 · 0 comments
Closed

Revisit react/jsx-indent-props #2

matthewheck opened this issue Jan 22, 2016 · 0 comments
Labels

Comments

@matthewheck
Copy link
Contributor

The current combination of react/jsx-indent-props and react/jsx-closing-bracket-location supports components as follows:

<Hello firstName="Matthew"
    lastName="Heck"
    date="2016-01-22"
    greeting="Welcome" />

Though this works fine, this code is less readable when components are nested, as follows:

<Hello
    firstName="Matthew"
    lastName="Heck"
    date="2016-01-22"
    greeting="Welcome" >
    <Goodbye />
</Hello>

It becomes easy to miss the nested component with this coupling. There are two possible solutions we could consider moving forward: aligned indentation or two tab indentation.

I'm leaning toward aligned indentations, but two tabs is also appealing. Anybody else?

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

No branches or pull requests

2 participants