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
[Fix] jsx-indent-props
: Apply indentation when operator is used in front of the upper line
#2808
Conversation
…front of the upper line Fixes jsx-eslint#647
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There is a regression with this update, as show in this example. At line "key=3" and the next one the linter is now expecting an indent of 6 instead of 4. This is not the case for the next element in the array.
|
@Moong0122 sure - no need for an issue tho, if you just want to open a PR directly? |
@Moong0122 hopefully we could solve and release it quickly enough that that wouldn't be a problem :-) |
@ljharb |
@Moong0122 sure you can freely use/adapt the example as you wish |
We're having this problem now. Using 7.21.3 causes no issues, but the latest one causes us a lot of errors. 👀 Thanks for fixing it in advance! |
Just a side question I discovered because of this BC break: I realized that the |
@danrot yes; eslint's indent rule both doesn't format jsx in all the same ways our rule does. I suggest configuring |
To apply indentation if there is an operator in front of the line above,
modified
lib/rules/jsx-indent-props
, and added test case intests/lib/rules/jsx-indent-props
.PR fixes #647