-
-
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
[Fix] no-unused-state
: avoid a crash
#3258
Conversation
Fixes jsx-eslint#3240. Co-authored-by: Willy Liao <willy.liao@appier.com> Co-authored-by: Jordan Harband <ljharb@gmail.com>
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.
Thanks; but first we'd need a test case that fails without the fix.
Unfortunately, I cannot reproduce it in the test environments. But the error still occurs in my working environment. Here is the sample code that failed in my working environment. The key point is that if I don't declare it in the arrow function form, it would be fine. It would be great if you could spend a few minutes checking the problem. You can just close the PR if you cannot find the root cause either. Thanks for your work again.
|
Your test case reveals another problem, but it passes without your change. |
oops, it does fail in older node versions :-) i'll update this PR. |
Codecov Report
@@ Coverage Diff @@
## master #3258 +/- ##
==========================================
+ Coverage 97.68% 97.69% +0.01%
==========================================
Files 121 121
Lines 8584 8586 +2
Branches 3117 3118 +1
==========================================
+ Hits 8385 8388 +3
+ Misses 199 198 -1
Continue to review full report at Codecov.
|
Thanks for the fix 🙏 |
Try to fix #3240 with the smallest change.