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
TypeError: Cannot read property 'object' of undefined
Occurred while linting /Users/will.heslam/projects/foo/index.tsx:53
at JSXAttribute (/Users/will.heslam/projects/foo/node_modules/eslint-plugin-react/lib/rules/jsx-handler-names.js:113:52)
which is apparently this line
I also just ran into this error - seems to occur in 7.21.0 but not 7.20.6
In my case, looks like it was from a component with a prop like this: onRenameFile={()=>{}}
TypeError: Cannot read property 'object' of undefined
Occurred while linting /Users/will.heslam/projects/foo/index.tsx:53
at JSXAttribute (/Users/will.heslam/projects/foo/node_modules/eslint-plugin-react/lib/rules/jsx-handler-names.js:113:52)
which is apparently this line
in
when parsing
though this is TypeScript, I don't think that matters - here's a recreation using a test example:
in
https://github.com/willheslam/eslint-plugin-react/tree/jsx-handler-names-crash
comparison:
https://github.com/yannickcr/eslint-plugin-react/compare/master...willheslam:jsx-handler-names-crash?expand=1
Running
npm test
on that branch results in:I'm not sure what an appropriate fix would be yet!
The text was updated successfully, but these errors were encountered: