jsx-eslint / eslint-plugin-react

React-specific linting rules for ESLint
MIT License
8.86k stars 2.76k forks source link

[Bug]: TypeError in version 7.34.1 #3721

Closed dfvalero closed 3 months ago

dfvalero commented 3 months ago

Is there an existing issue for this?

Description Overview

I just updated eslint-plugin-react to version 7.34.1 and I'm seeing this error message when running this command eslint --cache --ext .js,.jsx,.ts,.tsx .:

Oops! Something went wrong! :(

ESLint: 8.57.0

TypeError: Cannot read properties of undefined (reading 'name')
...

This are my dependencies related to eslint:

        "@babel/eslint-parser": "^7.24.1",
        "@babel/eslint-plugin": "^7.23.5",
        "@typescript-eslint/eslint-plugin": "^7.4.0",
        "@typescript-eslint/parser": "^7.4.0",
        "eslint": "^8.57.0",
        "eslint-config-prettier": "^9.1.0",
        "eslint-plugin-import": "^2.29.1",
        "eslint-plugin-jsx-a11y": "^6.8.0",
        "eslint-plugin-prettier": "^5.1.3",
        "eslint-plugin-react": "^7.34.1",
        "eslint-plugin-react-hooks": "^4.3.0",
        "eslint-webpack-plugin": "^4.1.0",

Expected Behavior

Not seeing any error, because it was working in version 7.33.2

eslint-plugin-react version

7.34.1

eslint version

8.57.0

node version

18.18.0

dfvalero commented 3 months ago

Discussing it here: https://github.com/jsx-eslint/eslint-plugin-react/issues/3717