ESLint plugin providing best-practice rules for writing Storybook stories. Current stable version is 10.3.5, released as part of the Storybook monorepo. The plugin helps enforce conventions like story/component name matching (story-exports), default export structure (default-exports), and hierarchy customization (hierarchy-separator). It is actively maintained alongside Storybook itself, with frequent alpha releases. Key differentiators: first-party support directly from Storybook maintainers, automatic rule suggestions, and integration with Storybook's CSF (Component Story Format). Alternative: community plugins like eslint-plugin-stories exist but are less comprehensive.
npm install eslint-plugin-storybookVerified import paths — ran on the pinned version, not inferred.
Configures the plugin with recommended rules via the prefixed config name.
Use 'storybook/default-exports' instead.
Use import plugin from 'eslint-plugin-storybook'; export default [...plugin.configs.recommended];
Add default export or disable rule for test files: 'storybook/story-exports': 'off'.
npm install --save-dev eslint-plugin-storybook
Add 'plugins: ["storybook"]' to your ESLint config.
Upgrade eslint-plugin-storybook to >=0.9.0 which supports flat config.