You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running newest eslint 7.10.0 and eslint-plugin-react 7.21.2, and i'm having this weird issue in functional components where eslint crashes whenever i use rest like below:
Oops! Something went wrong! :(
ESLint: 7.10.0
TypeError: Cannot read property 'type' of undefined
Occurred while linting /home/username/Webapps/project/src/components/ApplicantViewerModal/test.js:1
at /home/username/Webapps/project/node_modules/eslint-plugin-react/lib/rules/prop-types.js:156:39
at Array.forEach (<anonymous>)
at /home/username/Webapps/project/node_modules/eslint-plugin-react/lib/rules/prop-types.js:152:26
at Array.forEach (<anonymous>)
at isDeclaredInDestructuredParam (/home/username/Webapps/project/node_modules/eslint-plugin-react/lib/rules/prop-types.js:147:14)
at isDeclaredInComponent (/home/username/Webapps/project/node_modules/eslint-plugin-react/lib/rules/prop-types.js:189:18)
at /home/username/Webapps/project/node_modules/eslint-plugin-react/lib/rules/prop-types.js:204:13
at Array.filter (<anonymous>)
at reportUndeclaredPropTypes (/home/username/Webapps/project/node_modules/eslint-plugin-react/lib/rules/prop-types.js:201:51)
at /home/username/Webapps/project/node_modules/eslint-plugin-react/lib/rules/prop-types.js:226:11
However, if i just pull the rest syntax down into the function body, everything works fine:
I am running newest eslint 7.10.0 and eslint-plugin-react 7.21.2, and i'm having this weird issue in functional components where eslint crashes whenever i use rest like below:
eslint produces the following error:
However, if i just pull the rest syntax down into the function body, everything works fine:
The text was updated successfully, but these errors were encountered: