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
Is your feature request related to a problem? Please describe.
Some of our CSF3 stories export option arrays. These get imported by other stories, for example to loop through options in a composite story:
To ensure this doesn't gum up the Storybook UI, we define includeStories: /[a-z]/ in our default exports, so that our all-caps exports are excluded.
Describe the solution you'd like
A new rule should check that all named exports matching includeStories are in fact stories. This way, if we forget to define includeStories, the rule will notice that we're exporting named non-stories and flag them.
Describe alternatives you've considered
We could move the exports to other files, but this is exactly the reason includeStories exists. We'd prefer not to move Storybook-only utility constants into non-Storybook files.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Some of our CSF3 stories export option arrays. These get imported by other stories, for example to loop through options in a composite story:
To ensure this doesn't gum up the Storybook UI, we define
includeStories: /[a-z]/
in our default exports, so that our all-caps exports are excluded.Describe the solution you'd like
A new rule should check that all named exports matching
includeStories
are in fact stories. This way, if we forget to defineincludeStories
, the rule will notice that we're exporting named non-stories and flag them.Describe alternatives you've considered
We could move the exports to other files, but this is exactly the reason
includeStories
exists. We'd prefer not to move Storybook-only utility constants into non-Storybook files.The text was updated successfully, but these errors were encountered: