-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
"no-unused-prop-types" False Positive When Prop Used in "getDerivedStateFromProps" React 16 Lifecyle Method. #1797
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
I ran into a similar problem, but I found it's OK with props as long as they aren't destructured, even though it prefers destructuring. This isn't a fix (although it could be a workaround), but might help someone diagnose the bug. e.g.
should get rid of the warning, but would introduce |
I can not reproduce this with the latest version. @mrbinky3000 @redbmk |
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.
This is still an issue in version 7.21.4 |
@katrinaRenwickEmpire can you provide code, the actual behavior, and the expected behavior? |
Pending a repro, this seems resolved. |
I'm still seeing this error with the following packages:
Example of code:
linting errors:
eslintrc file in the project root folder:
eslintrc file in the folder that contains our react app:
Relevant eslint --debug info. Does
Unknown node type "ClassProperty"
help identify this issue?This issue was originally brought up in #1751 and #1681
A fix was released in v7.8.0 but It's not working for me in v7.8.2
The text was updated successfully, but these errors were encountered: