"TypeError: Cannot read property 'type' of undefined" while entering useEffect statement on VSCode #14554
Labels
3rd party plugin
This is an issue related to a 3rd party plugin, config, or parser
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
repro:needed
Projects
Tell us about your environment
Node version: v15.13.0
npm version: v7.9.0
Local ESLint version: v7.25.0
Global ESLint version: v7.23.0 (Currently used)
Operating System: darwin 18.6.0
What parser (default,
@babel/eslint-parser
,@typescript-eslint/parser
, etc.) are you using?@typescript-eslint/parser
Please show your full configuration:
Configuration
I am running ESLint via the
dbaeumer.vscode-eslint
extension in VSCode, Version 2.1.20. These are the extension settings I'm using:My VSCode settings are:
Typing this code will reliably set off the error, often several times:
What did you expect to happen?
No error
What actually happened? Please copy-paste the actual, raw output from ESLint.
For the above
useEffect()
statement, I get this error:I can also reliably reproduce the following error (usually two times) by typing
import type {} from
:Steps to reproduce this issue:
eslint-plugin-react-hooks
(I'm using version 4.2.0)dbaeumer.vscode-eslint
extension (version 2.1.20) on VSCode (I'm using version Version: 1.55.2)import { useEffect } from 'react';
useEffect ()
TypeError: Cannot read property 'type' of undefined
will occur.OR
eslint-plugin-simple-import-sort
(I'm using version 6.0.1)dbaeumer.vscode-eslint
extension (version 2.1.20) on VSCode (I'm using version Version: 1.55.2)import type {} from
ESLint: Cannot read property 'replace' of undefined
will occur (usually two times)Note: this seems to be new-ish behavior, though I can't pinpoint exactly when it started.
Are you willing to submit a pull request to fix this bug?
No, sadly, I'm not familiar enough with ESLint to know how to fix this.
The text was updated successfully, but these errors were encountered: