Skip to content

Commit

Permalink
feat: Update eslint-plugin-storybook version (#352)
Browse files Browse the repository at this point in the history
* feat: Update eslint-plugin-storybook version

* update snapshot

* update snapshot

* update snapshot

* update snapshot
  • Loading branch information
wakamsha authored Dec 7, 2024
1 parent ca2bcec commit 2171394
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 244 deletions.
43 changes: 12 additions & 31 deletions configs/flat/storybook.mjs
Original file line number Diff line number Diff line change
@@ -1,42 +1,23 @@
// @ts-check
// @ts-ignore
import importPlugin from 'eslint-plugin-import';
import * as storybook from 'eslint-plugin-storybook';
import storybookRuleSetBase from '../../rules/storybook.js';

const storybookRuleSetStories = {
plugins: {
storybook,
import: importPlugin,
},

rules: {
...storybook.configs.recommended.overrides[0].rules,
...storybook.configs['csf-strict'].rules,
...storybookRuleSetBase.rules,
'import/no-default-export': ['off'],
},
};

const storybookRuleSetConfig = {
plugins: {
storybook,
import: importPlugin,
},
rules: {
...storybook.configs.recommended.overrides[1].rules,
'import/no-default-export': ['off'],
},
};
import storybook from 'eslint-plugin-storybook';

export default [
{
files: ['**/*.@(stories|story).@(ts|tsx|js|jsx|mjs|cjs)'],
...storybookRuleSetStories,
plugins: {
storybook,
import: importPlugin,
},
},

...storybook.configs['flat/recommended'],
...storybook.configs['flat/csf-strict'],

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

0 comments on commit 2171394

Please sign in to comment.