Skip to content

Commit

Permalink
update snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
wakamsha committed Dec 7, 2024
1 parent 8446b2d commit 0a8f62d
Showing 1 changed file with 11 additions and 29 deletions.
40 changes: 11 additions & 29 deletions configs/flat/storybook.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,22 @@
// @ts-ignore
import importPlugin from 'eslint-plugin-import';
import storybook from 'eslint-plugin-storybook';
import storybookRuleSetBase from '../../rules/storybook.js';

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

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

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

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'],
},
},
];

0 comments on commit 0a8f62d

Please sign in to comment.