-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add support for Flow TypedArgument in no-unsed-prop-types rule #1412
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
Add support for Flow TypedArgument in no-unsed-prop-types rule #1412
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.
Seems legit
#1393 is this PR. I created the issue because in addition we should merge the code for I think this PR + #1377 cover the new Flow syntax for these two rules. Edit: There's also another rule related to props checking: There's also some other Flow related bug fixes in the current open PR list. #1400 and #1390 I also don't use Flow so can't really be certain. What I could do is test out on a Flow open-source code base that I have contributed a few times to to test if everything is fine once everything has landed in master. It's not a big code-base but it's better than nothing. 😄 |
Ok, then after merging theses PR I will publish a pre-release version for testing purpose. |
Great. Perhaps @EvHaus can also test it? I think he's also working with a (big?) Flow code base. I can try it on https://github.com/CompuIves/codesandbox-client/ (uses new Flow syntax) and https://github.com/bvaughn/babel-repl (uses normal Flow syntax, no TypedArguments) |
Yeah, I'd love to test a pre-release of this. I'm sitting on hundreds of Flow-typed components :) |
I just published Feel free to report any issue 😃 |
@yannickcr thanks, just ran into this problem (types in flow, not proptypes), googled it and found this issue, saw your comment and updated to |
Both @jseminck ❤️ |
While working on #1393 I noticed that
no-unused-prop-types
rule supports way more cases thanprop-types
rule already supports.Since we would release Flow 0.53 support in the next release for the
prop-types
rule, I felt it wouldn't be really complete if we supported the Flow TypedArgument syntax for this rule either.Since #1393 will take a bit more time for me to complete, I figured that an additional extra small PR to add this support to this rule would be very useful.
The code is 100% copy-paste from the
prop-types
rule. The goal for #1393 is to actually eliminate that duplication.