Parser v4.1.0 causes eslint-plugin-react-hooks to throw when destructuring a Component #2530
Closed
3 tasks done
Labels
duplicate
This issue or pull request already exists
package: parser
Issues related to @typescript-eslint/parser
I'm not entirely sure if this is the right place to post this, but since this happened when updating
@typescript-eslint/parser
from 4.0.1 to 4.1.0, I figured I may as well start here. I suspect it might be due to some recent changes in the scope manager.Repro
I didn't actually run it with this config, but I would guess that this would reproduce the problem:
The trouble here seems to be specifically related to destructuring a Component and then using it in JSX inside the useMemo hook. I haven't tried this with other hooks, so I'm not
Expected Result
ESLint does not throw
Actual Result
ESLint throws when running on this file.
Additional Info
--debug
output:Versions
@typescript-eslint/parser
4.1.0
TypeScript
3.9.3
ESLint
7.7.0
node
12.16.2
eslint-plugin-react-hooks
4.1.0
The text was updated successfully, but these errors were encountered: