Skip to content

rafaelrozon/eslint-plugin-storybook

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 

eslint-plugin-storybook

Eslint rules for Storybook Best Practices

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-storybook:

$ npm install eslint-plugin-storybook --save-dev

Usage

Add storybook to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "storybook"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "storybook/prefer-csf": "error"
    }
}

Supported Rules

  • prefer-csf: Display lint message when storiesOf API is used instead of the Component Story Format

About

Eslint Plugin for Storybook Best Practices

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published