-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
: Fix false positive when a jsx element is the last statement within a do expression
#2200
[Fix] jsx-indent
: Fix false positive when a jsx element is the last statement within a do expression
#2200
Conversation
… statement within a do expression (with tests) Fixes jsx-eslint#2199.
6654664
to
059dd68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some test cases to cover this; both paren-wrapped and not.
By paren-wrapped, did you mean this? const TestDoExpression = () => (
<div>
{(do {
const num = 1 + 1;
<div>{num}</div>;
})}
</div>
); |
Yep! |
059dd68
to
02c2230
Compare
Pardon me for the late reply. While adding required test cases, I discovered few more cases that need to be handled so I revisited & rewritten the code. I've just pushed a new commit with tests, thanks for the patience. |
02c2230
to
af890c2
Compare
af890c2
to
c478bc8
Compare
c478bc8
to
32e27b7
Compare
Fixes #2199.