Skip to content

Commit

Permalink
feat: Implement v3 config "storybook" (#241)
Browse files Browse the repository at this point in the history
* feat: Implement config "storybook"

* fix config

* Revert "fix config"

This reverts commit 981473b.

fix config

* disable `import/no-default-export` rule for storybook files
  • Loading branch information
wakamsha authored Apr 2, 2024
1 parent a8908d6 commit bca4534
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions configs/storybook.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
overrides: [
{
extends: ['../rules/storybook'],
files: [
'*.stories.@(ts|tsx|js|jsx)',
'*.story.@(ts|tsx|js|jsx)',
'**/.storybook/**/*.@(ts|tsx|js|jsx)',
],
},
],
};
13 changes: 13 additions & 0 deletions rules/storybook.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,17 @@ module.exports = {
// Starting in CSF 3.0, story titles can be generated automatically.
'storybook/no-title-property-in-meta': 'error',
},

overrides: [
{
files: [
'*.stories.@(ts|tsx|js|jsx)',
'*.story.@(ts|tsx|js|jsx)',
'**/.storybook/**/*.@(ts|tsx|js|jsx)',
],
rules: {
'import/no-default-export': ['off'],
},
},
],
};

0 comments on commit bca4534

Please sign in to comment.