-
-
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
no-unused-prop-types
doesn't check nextProps
of componentWillReceiveProps
#801
Comments
What's the use case for a prop that's not used in the render path? |
It might not be idiomatic React, but in this case, we're waiting on a prop On Wed, Aug 31, 2016 at 10:07 PM Jordan Harband notifications@github.com
|
This will be fixed by #792 |
Great! Thanks @EvNaverniouk |
Hi, I still get this same error. When we use a prop only with |
still getting this error too. |
This should be fixed. @wx2228. what version of eslint-plugin-react do you use? If using the latest, could you provide sample code of what is failing? Then I can look into it. Thanks! |
@jseminck thanks for the prompt reply. I am using 6.10.3. I will upgrade it |
it also wont check nextProps if componentWillReceiveProps is declared as an arrow function. |
@andfelzapata would you file that as a separate issue? |
If a prop is only used in the context of
nextProps
, the lint rule mistakenly thinks that the prop is never used.Here's a repro case:
The text was updated successfully, but these errors were encountered: