diff --git a/configs/flat/storybook.mjs b/configs/flat/storybook.mjs index 18fe583..253b969 100644 --- a/configs/flat/storybook.mjs +++ b/configs/flat/storybook.mjs @@ -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'], + }, }, ];