Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

story-exports: provide better feedback when using filters #107

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Oct 10, 2022

Issue: N/A

What Changed

The story-exports rule now detects whether you are using includeStories/excludeStories and provides a more helpful message in case there are not exported stories. A possible scenario is you have a typo in your includeStories which will result in Storybook not including it:

export default {
  title: 'Button',
  includeStories: ['myStory'], // <-- notice the lowercase m, which won't match with the story name
};

export const MyStory = {};

The file should have at least one story export. Make sure the includeStories/excludeStories you defined are correct, otherwise Storybook will not use any stories for this file.'

Checklist

Check the ones applicable to your change:

  • Ran yarn update-all
  • Tests are updated
  • Documentation is updated

Change Type

Indicate the type of change your pull request is:

  • maintenance
  • documentation
  • patch
  • minor
  • major

Release notes

The story-exports rule now detects whether you are using includeStories/excludeStories and provides a more helpful message in case there are not exported stories. A possible scenario is you have a typo in your includeStories which will result in Storybook not including it:

export default {
  title: 'Button',
  includeStories: ['myStory'], // <-- notice the lowercase m, which won't match with the story name
};

export const MyStory = {};

@yannbf yannbf added the patch Increment the patch version when merged label Oct 10, 2022
@ndelangen ndelangen merged commit 20581d0 into main Oct 10, 2022
@ndelangen ndelangen deleted the fix/improve-story-exports branch October 10, 2022 10:57
@github-actions
Copy link

🚀 PR was released in v0.6.5 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants