3.2.14 • Published 1 year ago

@chanzuckerberg/eslint-plugin-stories v3.2.14

Weekly downloads
30
License
MIT
Repository
github
Last release
1 year ago

eslint-plugin-stories

ESLint rules for Storybook stories.

In particular, these rules ensure that stories can be used in non-Storybook contexts. For example, for accessibility testing via axe-storybook-testing, or visual regression testing via percy-storybook.

Installation

Install @chanzuckerberg/eslint-plugin-stories with your favorite package manager. With yarn, that would look like

yarn add --dev @chanzuckerberg/eslint-plugin-stories

Usage

Add @chanzuckerberg/stories as a plugin in your eslint configuration file.

// .eslintrc.json
{
  "plugins": ["@chanzuckerberg/stories"]
}

Then you can either extend the recommended config to turn on all the rules

// .eslintrc.json
{
  "extends": ["plugin:@chanzuckerberg/stories/recommended"]
}

or configure the rules individually

// .eslintrc.json
{
  "rules": {
    "@chanzuckerberg/stories/no-ext-resources-in-stories": "warn"
  }
}

Rules

NameDescriptionConfig
csf-object-literal-or-functionEnforce that stories are either an object literal or function.recommended
csf-v3-typesEnforce component story format (CSF) v3 stories have explicit TypeScript types where needed for inferrencestrict
no-csf-v2Use object stories (component story format v3) instead of functions.strict
no-ext-resources-in-storiesPrevent external resources from being loaded in stories.recommended
no-components-without-storyEnforce that new components are created with a corresponding storystrict
3.2.13

1 year ago

3.2.14

1 year ago

3.2.12

1 year ago

3.2.11

1 year ago

3.2.10

1 year ago

3.2.9

1 year ago

3.2.8

1 year ago

3.2.7

1 year ago

3.2.6

1 year ago

3.2.5

1 year ago

3.2.4

2 years ago

3.2.4-alpha.0

2 years ago

3.2.3

2 years ago

3.2.2

2 years ago

3.2.1

2 years ago

3.2.0

2 years ago

3.1.1

2 years ago

3.0.2

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

2.0.0-alpha.16

2 years ago

1.2.2

3 years ago

1.2.2-alpha.12

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.0-alpha.1

3 years ago

0.1.0-alpha.0

3 years ago