-
-
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] boolean-prop-naming
: handle React.FC, intersection, union types
#3241
Conversation
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.
Thanks, this is great!
@ljharb and in the meantime, I have added a logic that handles the union type as well, I'm looking forward to your review! |
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.
Seems great!
boolean-prop-naming
: handle React.FC, intersection, union types
hmm, looks like the latest changes you pushed up (or, possibly, my tiny tweaks, but i doubt it) are failing some tests. can you take a look? |
Codecov Report
@@ Coverage Diff @@
## master #3241 +/- ##
=======================================
Coverage 97.68% 97.69%
=======================================
Files 121 121
Lines 8520 8550 +30
Branches 3076 3096 +20
=======================================
+ Hits 8323 8353 +30
Misses 197 197
Continue to review full report at Codecov.
|
✅ and done, thanks, @ljharb for tweaking my code a bit! edit: not yet 😅 |
@ljharb ok, I think the most important cases have been handled, could you please run all test suites once again? |
thank you @ljharb ❤️ |
Types of changes
This PR fixes #3197, therefore, the
boolean-prop-naming
rule validates correctly the following code:Moreover, previously, the plugin could not handle a case like this:
or
Now, the plugin handles the intersection and union types as well, so the following will be validated correctly: