-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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-plugin-react-hooks (4.1.2) - The prop value with an expression type of ChainExpression could not be resolved #19940
Comments
Thanks for the report. Including the linted code (and the parser e.g. You can detect the line of code that caused it by linting fewer files (similar to |
Where is this message coming from? I don’t think it’s ours. ESLint? |
The parser dependency is Line of code that caused the isse:
The prop value is being accessed via optional chaining and that's what's throwing the error apparently. If I remove it The type of the prop:
|
@gaearon As you said, I think the issue it's not related to React at all... Should be better to create the issue on the I created it here because it started to appear on |
I also started seeing this output (upgrading an existing project). The error string is coming from the I'll open an issue on that repo; posting my findings here because this issue is currently the only searchable result. |
This is fixed in [email protected] jsx-eslint/jsx-ast-utils#102 |
I don't think |
eslint-plugin-react depends on jsx-ast-utils |
|
@gaearon It's strange because this output disappears when downgrading |
In either case it seems like this is solved upstream so not actionable for us. |
It works well on my end. I appreciate |
run |
React version: ^16.10.2
Steps To Reproduce
[email protected]
yarn eslint src --ext=js,jsx,ts,tsx
Related issue: #19810 (comment)
The current behavior
The linter is showing the following message:
It started to appear on
[email protected]
The expected behavior
Do not show the message
The text was updated successfully, but these errors were encountered: