-
-
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-sort-props
: sorted attributes now respect comments
#3358
[Fix] jsx-sort-props
: sorted attributes now respect comments
#3358
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3358 +/- ##
==========================================
+ Coverage 97.54% 97.55% +0.01%
==========================================
Files 123 123
Lines 8873 8918 +45
Branches 3244 3255 +11
==========================================
+ Hits 8655 8700 +45
Misses 218 218
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
5c690e0
to
8e5e945
Compare
Looks like there's older eslint versions where |
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.
Thank you for the review!
I really appreciate your time. I have learned many of my own faults with redundant code, naming variables, and conditional statements. I hope in the future to improve and reduce these nuances.
For this change: I am unsure other ways of handling errors for older ESLint versions. |
@ljharb After changes, I tried to search issue online and through other rule using older ESLint, but I had no luck. |
The I'm thinking about whether or not we need an option for this, or whether it should be the default behavior. Either way, there aren't any tests for the |
I created the |
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.
adding some lint fixes
c30e26f
to
48d721f
Compare
jsx-sort-props
: sorted attributes now respect comments
48d721f
to
c14e209
Compare
Thank you for reviewing the changes! @ljharb |
Fixes #2366
Previously comments were not sorted with rule.
With fix, comments are included during sort.
Special Attribute Conditions: