Indexed by TopGit from live GitHub metadata: storybookjs/eslint-plugin-storybook has 289 stars, written primarily in TypeScript. πOfficial ESLint plugin for Storybook
Snapshot summary built from the project's own GitHub metadata β there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then β see the READ ME tab for the original README in full.
This package has moved and is now part of the Storybook monorepo since version 9. Please update your dependencies. This repository is no longer maintained. If there are issues or requests, please report them in the Storybook monorepo.
eslint-plugin-storybook
Best practice rules for Storybook
Installation
You'll first need to install ESLint:
npm install eslint --save-dev
# or
yarn add eslint --dev
Next, install eslint-plugin-storybook:
npm install eslint-plugin-storybook --save-dev
# or
yarn add eslint-plugin-storybook --dev
And finally, add this to your .eslintignore file:
// Inside your .eslintignore file
!.storybook
This allows for this plugin to also lint your configuration files inside the .storybook folder, so that you always have a correct configuration and don't face any issues regarding mistyped addon names, for instance.
For more info on why this line is required in the .eslintignore file, check this ESLint documentation.
If you are using flat config style, add this to your configuration file:
Use the following table to use the correct version of this package, based on the version of ESLint you're using:
ESLint version
Storybook plugin version
^9.0.0
^0.10.0
^8.57.0
^0.10.0
^7.0.0
~0.9.0
Usage
Configuration (.eslintrc)
Use .eslintrc.* file to configure rules in ESLint < v9. See also: https://eslint.org/docs/latest/use/configure/.
Add plugin:storybook/recommended to the extends section of your .eslintrc configuration file. Note that we can omit the eslint-plugin- prefix:
{
// extend plugin:storybook/<configuration>, such as:
"extends": ["plugin:storybook/recommended"]
}
This plugin will only be applied to files following the *.stories.* (we recommend this) or *.story.* pattern. This is an automatic configuration, so you don't have to do anything.
Overriding/disabling rules
Optionally, you can override, add or disable rules settings. You likely don't want these settings to be applied in every file, so make sure that you add a overrides section in your .eslintrc.* file that applies the overrides only to your stories files.
{
"overrides": [
{
// or whatever matches stories specified in .storybook/main.js
"files": ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],
"rules": {
// example of overriding a rule
'storybook/hierarchy-separator': 'error',
// example of disabling a rule
'storybook/default-exports': 'off',
}
}
]
}
Configuration (eslint.config.[c|m]?js)
Use eslint.config.[c|m]?js file to configure rules using the flat config style. This is the default in ESLint v9, but can be used starting from ESLint v8.57.0. See also: https://eslint.org/docs/latest/use/configure/configuration-files-new.
import storybook from 'eslint-plugin-storybook'
export default [
// add more generic rulesets here, such as:
// js.configs.recommended,
...storybook.configs['flat/recommended'],
// something ...
]
In case you are using utility functions from tools like tseslint, you might need to set the plugin a little differently:
import storybook from "eslint-plugin-storybook";
import somePlugin from 'some-plugin';
import tseslint from 'typescript-eslint';
export default tseslint.config(
somePlugin,
storybook.configs["flat/recommended"] // notice that it is not destructured
);"
Overriding/disabling rules
Optionally, you can override, add or disable rules settings. You likely don't want these settings to be applied in every file, so make sure that you add a flat config section in your eslint.config.[m|c]?js file that applies the overrides only to your stories files.
import storybook from 'eslint-plugin-storybook'
export default [
// ...
...storybook.configs['flat/recommended'],
{
files: ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],
rules: {
// example of overriding a rule
'storybook/hierarchy-separator': 'error',
// example of disabling a rule
'storybook/default-exports': 'off',
},
},
// something ...
]
How does storybookjs/eslint-plugin-storybook compare to other UI / UX projects?
storybookjs/eslint-plugin-storybook is tracked by TopGit in the UI / UX category, with 289 GitHub stars and written in TypeScript. Browse the UI / UX topic page on TopGit to compare it against similar projects by stars and activity.
Is storybookjs/eslint-plugin-storybook open source?
Yes β storybookjs/eslint-plugin-storybook ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/storybookjs/eslint-plugin-storybook.
What else is in the UI / UX space?
storybookjs/eslint-plugin-storybook is tracked by TopGit under the UI / UX category, alongside 3 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is storybookjs/eslint-plugin-storybook?
storybookjs/eslint-plugin-storybook (storybookjs/eslint-plugin-storybook) is a TypeScript project on GitHub. From the project's own README: πOfficial ESLint plugin for Storybook
Where do I read more about storybookjs/eslint-plugin-storybook?
This TopGit page is a snapshot β the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/storybookjs/eslint-plugin-storybook is the definitive source.
Why is storybookjs/eslint-plugin-storybook categorized under UI / UX?
TopGit places storybookjs/eslint-plugin-storybook in the UI / UX category based on its GitHub topics and description (tagged: "eslint", "eslint-plugin", "storybook"). Categories are assigned from real repository metadata, not editorial guesswork.
Read full README in the tab above.
Curious whether eslint-plugin-storybook is right for you?
Let ChatGPT, Claude, or Perplexity look into it β click below and see what AI actually says about eslint-plugin-storybook.