-
-
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
[New] add jsx-props-no-spread-multi
#3724
[New] add jsx-props-no-spread-multi
#3724
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3724 +/- ##
==========================================
+ Coverage 94.28% 97.75% +3.46%
==========================================
Files 134 135 +1
Lines 9613 9630 +17
Branches 3486 3490 +4
==========================================
+ Hits 9064 9414 +350
+ Misses 549 216 -333 ☔ View full report in Codecov by Sentry. |
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 a new rule has a cost, and if you’ve only seen it 3-4 times (i never have), i don’t think it’ll be that useful. (Generally it’s better to discuss a new rule in an issue first so it doesn’t feel like work is wasted in the event it’s not merged)
No hard feelings if it's not merged, I understand it's more of a niche thing, worst case I will port it over to my own plugin :) |
@ljharb do you have any suggestions where I could sample this rule against a larger set of JSX code in the wild? Github search hasn't been particularly helpful due to the lack of ast node search. I ran this rule again some internal code bases and found 2 more violations which is still not statistically significant but an indicator that this may be more wide-spread than I thought. |
Any interest/thoughts on this? If not I will close this PR eow and move into a separate library. |
@SimonSchick we use https://www.npmjs.com/package/eslint-remote-tester to test things weekly, that might be worth looking into? |
d366ac0
to
e0f2872
Compare
Updated, but CI seems to be wonky, I rebased ontop of upstream (this repo). |
015d168
to
eafa9e9
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.
LGTM. I'm going to hold off merging this until after I cut a release with all the pending patch changes, though.
jsx-props-no-spread-multi
380e32c
to
51d342b
Compare
eafa9e9
to
a762b25
Compare
@ljharb ty for your time and including this! |
Please see notes in code.
I think this rule has value in catching some niche bugs, I personally only saw this ~3-4 times throughout my career.