-
Notifications
You must be signed in to change notification settings - Fork 5
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
TypeError: Cannot read properties of null (reading 'callee') #8
Comments
Hello, I see you are using version 8, have you tested using version 7? I haven't done this update yet and haven't seen what's changed, maybe it broke something. But I'll be looking at it and updating it as soon as I can. |
Fixed in version 0.4.2! |
I have the same problem, I tried with both eslint 8.9.0 and 7.32.0 and I always get the same error :
(eslint-plugin-hooks@0.4.2) thank you for your work @hiukky ! I would really like to be able to enforce hooks order |
@Atom54 Thanks for your feedback! could you provide an example of the code in I'll be correcting and adding some tests so we don't blow this again! |
Yes of course :
If I remove my Booter.tsx then the ESLint rule is working everywhere else in my project indeed. |
Ok it's related to the variable declaration in Booter script. If I remove this : Now if I put it back and init it with a null value (as I should have...), the problem disappears ! 🙂 |
@Atom54 You were fast, but it's still a bug in this plugin! as the syntax of declaring a variable without initializing is valid in js, we cannot have this limitation, even if the recommended thing is to initialize. But for that we can leave it to https://eslint.org/docs/rules/init-declarations . I'll be releasing a path for it this week, thanks for reporting! |
Fixed in version 0.4.3! |
The text was updated successfully, but these errors were encountered: