Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 6.62 KB

storybook.md

File metadata and controls

46 lines (33 loc) · 6.62 KB

storybook config

Config for projects using Storybook for UI components.

🏗️ Setup

  1. If you haven't already, make sure to install @code-pushup/eslint-config and its required peer dependencies.

  2. Since this plugin requires additional peer dependencies, you have to install them as well:

    npm install -D eslint-plugin-storybook
  3. Add to your eslint.config.js file:

    import storybook from '@code-pushup/eslint-config/storybook.js';
    import tseslint from 'typescript-eslint';
    
    export default tseslint.config(...storybook);

📏 Rules (11)

🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.
🧪🚫 Disabled for test files.
🧪⚠️ Severity lessened to warning for test files.

🚨 Errors (7)

Plugin Rule Options Autofix Overrides
storybook await-interactions
Interactions should be awaited
🔧, 💡
storybook context-in-play-function
Pass a context when invoking play function of another story
storybook default-exports
Story files should have a default export
🔧, 💡
storybook no-uninstalled-addons
This rule identifies storybook addons that are invalid because they are either not installed or contain a typo in their name.
storybook story-exports
A story file must contain at least one story export
storybook use-storybook-expect
Use expect from @storybook/test or @storybook/jest
🔧
storybook use-storybook-testing-library
Do not use testing-library directly on stories
🔧, 💡

⚠️ Warnings (4)

Plugin Rule Options Autofix Overrides
storybook csf-component
The component property should be set
storybook hierarchy-separator
Deprecated hierarchy separator in title property
🔧, 💡
storybook no-redundant-story-name
A story should not have a redundant name property
🔧, 💡
storybook prefer-pascal-case
Stories should use PascalCase
🔧, 💡