-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
react/jsx-indent not working when using string literal as a child #1136
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
Comments
There is a test that enforces this behavior: https://github.com/yannickcr/eslint-plugin-react/blob/d672588cc39334e215ff5993f859f159fc977d57/tests/lib/rules/jsx-indent.js#L198 |
That test was removed here: 6e5f688#diff-93c6a0eb3f976d39af0b0a8843ddba24L215 and then restored here: e9fb52d#diff-93c6a0eb3f976d39af0b0a8843ddba24R215 Intentional or not, this feels like a flaw in the rule - literals should have their indentation enforced just like anything else. |
@ljharb Great. I'll look into fixing this |
hey guys, has this been resolved? |
It's still open, so I don't think so. |
According to discussion in #1662 (comment) this can get tricky with elements like |
Any solution for this? |
eslint 3.19.0, eslint-plugin-react 6.10.3
setting:
minimal test using a string literal which causes no error:
expected this to be correct:
though the error is correctly thrown when you are using an expression:
The text was updated successfully, but these errors were encountered: