-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
no-unused-prop-types crashes when using a setState updater with no second param defined #1685
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
@gbedardsiceupgrade Do you have an example code to reproduce this? |
I added a passing test linked to this issue; we’d definitely need a repro case. @gbedardsiceupgrade can you try to reproduce this on v7.7.0? |
Ah, looks like updating from |
I updated to 7.10.0 still get the error! prettier-eslint [ERROR]: eslint fix failed due to an eslint error |
@Leonard-Li777 can you share the code it’s crashing on? |
Happy to fix it with a repro; please file a new issue. |
Uh oh!
There was an error while loading. Please reload this page.
When using
setState
with an arrow function like so:The plugin crashes with the following stack trace:
The plugin seems to assume that the second
props
param will be always defined on the function, when it actually won't always be the case.The text was updated successfully, but these errors were encountered: