storybookjs / eslint-plugin-storybook

🎗Official ESLint plugin for Storybook
MIT License
245 stars 52 forks source link

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

Closed yannbf closed 1 year ago

yannbf commented 1 year ago

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:

Change Type

Indicate the type of change your pull request is:

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 = {};
github-actions[bot] commented 1 year ago

:rocket: PR was released in v0.6.5 :rocket: