Logo
  • DB
  • About
  • Updates
eslint-plugin-storybook

Best practice rules for Storybook

❯ npm i --save-dev eslint-plugin-storybook
πŸ“– READMEπŸ› BugsGitHub LogoGitHubnpm Logonpmstorybook
πŸ•΅οΈβ€β™‚οΈ Linter
  • 4 Configs
  • 14 Rules
GitHub LogoGitHub
  • TypeScript
  • 213 Stars
  • 7 Watchers
npm Logonpm
  • 1.1M Wkly Downloads
  • +55% WoW
  • 0.6.15 β€’ 108 kB
πŸ“‹ Requirements
  • Node: 12.x || 14.x || >= 16
  • ESLint: >=6
ConfigurationRules
πŸ”΄ addon-interactions
🟠 csf
🟑 csf-strict2
βœ… recommended
RuleDescriptionπŸ”§πŸ’‘πŸ’­πŸ—‚οΈβš™οΈβŒπŸ”΄πŸŸ πŸŸ‘βœ…
await-interactions

Interactions should be awaited

πŸ”§πŸ’‘β—
context-in-play-function

Pass a context when invoking play function of another story

❗
csf-component

The component property should be set

πŸ“–
default-exports

Story files should have a default export

πŸ”§πŸ’‘β—
hierarchy-separator

Deprecated hierarchy separator in title property

πŸ”§πŸ’‘β—
meta-inline-properties

Meta should only have inline properties

β—βš™οΈ
no-redundant-story-name

A story should not have a redundant name property

πŸ”§πŸ’‘πŸ“–
no-stories-of

storiesOf is deprecated and should not be used

β—πŸŸ‘
no-title-property-in-meta

Do not define a title in meta

πŸ”§πŸ’‘β—πŸŸ‘
no-uninstalled-addons

This rule identifies storybook addons that are invalid because they are either not installed or contain a typo in their name.

β—βš™οΈ
prefer-pascal-case

Stories should use PascalCase

πŸ”§πŸ’‘πŸ“–
story-exports

A story file must contain at least one story export

❗
use-storybook-expect

Use expect from @storybook/jest

πŸ”§πŸ’‘πŸ“–
use-storybook-testing-library

Do not use testing-library directly on stories

πŸ”§πŸ’‘πŸ“–
Β© 2024 Lintbase