-
Notifications
You must be signed in to change notification settings - Fork 47.1k
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
Bug: ESLint: Cannot read property 'type' of undefined Occurred while linting #21342
Comments
Add an exact reproducing file, please? |
reproducing file: import { useEffect } from "react";
export default function Test(): JSX.Element {
useEffect();
return (
<h1>Hello world</h1>
);
} |
Could you try turning this into a test case in https://github.com/facebook/react/blob/master/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js? |
This test case seems to imply that it should work. react/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js Lines 1696 to 1698 in 9cd52b2
|
Ops, sorry about that. I taught it wasn't duplicate because that one was closed and the error persisted. I'll wait the update. Thanks @eps1lon |
React version:
17.0.2
eslint-plugin-react-hooks version:
4.2.0
Steps To Reproduce
useEfect(
Link to code example:
https://github.com/LeonardoRick/podcastr
The current behavior
output:
error line:
The expected behavior
No errors showing, since I'm currently typing the code
The text was updated successfully, but these errors were encountered: