-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Added tests for jsx-curly-spacing that deal with comments in children. #1414
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
Added tests for jsx-curly-spacing that deal with comments in children. #1414
Conversation
@ljharb Does this seem good to merge? I'm also running into this problem. |
8715216
to
36a2008
Compare
I've rebased this, and one test is still failing. |
Notably, the one failing test is just about failing to remove a space from before a |
Before this, spaces before/after braces when there should be none resulted in two overlapping fixes for the full brace content. And so they required two passes. But the tester does only one pass, so only one white space was fixed and the test failed. By including comments in the range calculation for the fix, the range is now properly limited, making it possible to have start and end fixes in one pass.
Sweet, looks like this is good to go (see my commit message for details about what the problem was). |
9219e52
to
e4de360
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.
Looks great, thanks!
See also:
#648 (comment)