storybookjs / eslint-plugin-storybook

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

Rule: story-exports #42

Closed yannbf closed 2 years ago

yannbf commented 2 years ago

Is your feature request related to a problem? Please describe. The plugin should error in case there are no story exports in a file:

incorrect:

export default { ... }
// but no story!

or

export default { 
  ...,
  excludeStories: /.*Data$/,
}
export const mockData = {} // not a story!

correct:

export default { ... }
export const MyStory = {}

storiesOf:

import { storiesOf } from '@storybook/react'
storiesOf('MyComponent', module)