eslint-plugin-storybook
eslint-plugin-storybook copied to clipboard
Failed destructure of `id` from `decl.decrations[0]` as it is undefined
Describe the bug
I occasionally get a popup complaining about a failed destructure:
[Error - 1:05:57 PM] ESLint stack trace:
[Error - 1:05:57 PM] TypeError: Cannot destructure property 'id' of 'decl.declarations[0]' as it is undefined.
Occurred while linting /Users/calebjasik-defined/Github/defined.net/webclient/src/screens/hosts/detail/HostDetailPage.stories.tsx:67
Rule: "storybook/prefer-pascal-case"
at ExportNamedDeclaration (/Users/calebjasik-defined/Github/defined.net/webclient/node_modules/eslint-plugin-storybook/dist/rules/prefer-pascal-case.js:114:29)
at ruleErrorHandler (/Users/calebjasik-defined/Github/defined.net/webclient/node_modules/eslint/lib/linter/linter.js:1114:28)
To Reproduce
Steps to reproduce the behavior:
Run the plugin over a story w/ the name FFDefault and probably more bits... name: 'Default with HOST_BLOCKLIST',
Expected behavior I would expect my eslint plugin not to throw errors
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
https://github.com/storybookjs/eslint-plugin-storybook/blob/7632d90b9690cb3b6003e02e05141c89ad5542a7/lib/rules/prefer-pascal-case.ts#L132