storybookjs / eslint-plugin-storybook

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

New rule: checking setting story annotations out of order #71

Open yannbf opened 2 years ago

yannbf commented 2 years ago

Is your feature request related to a problem? Please describe.

From reddit, a user mentioned an example that happens quite often when users are writing CSF2:

export const AStory = Template.bind({})
AStory.args = { something: true }

export const AnotherStory = Template.bind({})
AStory.args = { something: false } // <-- supposed to be AnotherStory

This kind of thing brings confusion, so there should be a way to help detect that.