Skip to content

Commit

Permalink
implement rule "storybook"
Browse files Browse the repository at this point in the history
  • Loading branch information
wakamsha committed Mar 18, 2024
1 parent 0c8225b commit 5aadfc5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions rules/storybook.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
plugins: ['storybook'],
extends: ['plugin:storybook/recommended'],
rules: {
// `storiesOf` is deprecated and should not be used
// https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-stories-of.md
// Since Storybook 5.2, the CSF format was introduced and the storiesOf API has been deprecated.
'storybook/no-stories-of': 'error',

// Do not define a title in meta
// https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-title-property-in-meta.md
// Starting in CSF 3.0, story titles can be generated automatically.
'storybook/no-title-property-in-meta': 'error',
},
};

0 comments on commit 5aadfc5

Please sign in to comment.