-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
no-unused-prop-types throwing error for destructured props #2424
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
Comments
cc @golopot |
I cannot reproduce this. I added the test case in my fork branch and CI is passing. https://github.com/golopot/eslint-plugin-react/tree/eeee I have tried |
a PR with the test case would be appreciated. @woodenconsulting can you provide any more info that would be helpful? |
@golopot @ljharb I created a repo which reproduces the issue: https://github.com/woodenconsulting/epr-2424 Additional Notes
I haven't had a chance to dig any further; however, for additional context this error is happening across several private repos where pinning to the prior version of |
aha, that first bullet point seems like the trick. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Can confirm. Thanks for the fix and the notification. 🥇 |
Sample Code
Issue
The linter erroneously throws on the
test
prop since only its descendants are used:'test' PropType is defined but prop is never used react/no-unused-prop-types
.The issue first appeared with the 7.15.0 release published about 11 hours ago from the time of this writing. It's likely due to this commit.
Expected
The linter should not throw
The text was updated successfully, but these errors were encountered: