Socket
Socket
Sign inDemoInstall

eslint-plugin-storybook

Package Overview
Dependencies
Maintainers
2
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-storybook - npm Package Compare versions

Comparing version 0.3.5 to 0.4.0

dist/rules/story-exports.js

16

CHANGELOG.md

@@ -0,1 +1,17 @@

# v0.4.0 (Fri Nov 12 2021)
#### 🚀 Enhancement
- Rule: add story-exports [#44](https://github.com/storybookjs/eslint-plugin-storybook/pull/44) ([@yannbf](https://github.com/yannbf))
#### 🐛 Bug Fix
- docs(README): add overrides section [#43](https://github.com/storybookjs/eslint-plugin-storybook/pull/43) ([@yannbf](https://github.com/yannbf))
#### Authors: 1
- Yann Braga ([@yannbf](https://github.com/yannbf))
---
# v0.3.5 (Thu Nov 11 2021)

@@ -2,0 +18,0 @@

1

dist/configs/csf.js

@@ -13,2 +13,3 @@ "use strict";

'storybook/no-redundant-story-name': 'warn',
'storybook/story-exports': 'error',
},

@@ -15,0 +16,0 @@ },

@@ -14,2 +14,3 @@ "use strict";

'storybook/prefer-pascal-case': 'warn',
'storybook/story-exports': 'error',
'storybook/use-storybook-expect': 'error',

@@ -16,0 +17,0 @@ 'storybook/use-storybook-testing-library': 'error',

2

package.json
{
"name": "eslint-plugin-storybook",
"version": "0.3.5",
"version": "0.4.0",
"description": "Best practice rules for Storybook",

@@ -5,0 +5,0 @@ "keywords": [

@@ -60,7 +60,3 @@ <p align="center">

// extend plugin:storybook/<configuration>, such as:
"extends": ["plugin:storybook/recommended"],
// Optional: override/add/disable rules settings here, such as:
"rules": {
// 'storybook/no-redundant-story-name': 'error'
}
"extends": ["plugin:storybook/recommended"]
}

@@ -71,2 +67,23 @@ ```

### 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.
```js
{
"overrides": [
{
// or whatever matches stories specified in .storybook/main.js
"files": ['*.stories.@(ts|tsx|js|mjs|cjs)'],
"rules": {
// example of overriding a rule
'storybook/hierarchy-separator': 'error',
// example of disabling a rule
'storybook/defaul-exports': 'off',
}
}
]
}
```
### MDX Support

@@ -84,14 +101,15 @@

| Name | Description | 🔧 | Included in configurations |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------- | --- | -------------------------------------------------------- |
| [`storybook/await-interactions`](./docs/rules/await-interactions.md) | Interactions should be awaited | 🔧 | <ul><li>addon-interactions</li><li>recommended</li></ul> |
| [`storybook/csf-component`](./docs/rules/csf-component.md) | The component property should be set | | <ul><li>csf</li></ul> |
| [`storybook/default-exports`](./docs/rules/default-exports.md) | Story files should have a default export | 🔧 | <ul><li>csf</li><li>recommended</li></ul> |
| [`storybook/hierarchy-separator`](./docs/rules/hierarchy-separator.md) | Deprecated hierachy separator in title property | 🔧 | <ul><li>csf</li><li>recommended</li></ul> |
| [`storybook/no-redundant-story-name`](./docs/rules/no-redundant-story-name.md) | A story should not have a redundant name property | 🔧 | <ul><li>csf</li><li>recommended</li></ul> |
| [`storybook/no-stories-of`](./docs/rules/no-stories-of.md) | storiesOf is deprecated and should not be used | | <ul><li>csf-strict</li></ul> |
| [`storybook/no-title-property-in-meta`](./docs/rules/no-title-property-in-meta.md) | Do not define a title in meta | 🔧 | <ul><li>csf-strict</li></ul> |
| [`storybook/prefer-pascal-case`](./docs/rules/prefer-pascal-case.md) | Stories should use PascalCase | 🔧 | <ul><li>recommended</li></ul> |
| [`storybook/use-storybook-expect`](./docs/rules/use-storybook-expect.md) | Use expect from `@storybook/jest` | 🔧 | <ul><li>addon-interactions</li><li>recommended</li></ul> |
| [`storybook/use-storybook-testing-library`](./docs/rules/use-storybook-testing-library.md) | Do not use testing-library directly on stories | 🔧 | <ul><li>addon-interactions</li><li>recommended</li></ul> |
| Name | Description | 🔧 | Included in configurations |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------- | --- | -------------------------------------------------------- |
| [`storybook/await-interactions`](./docs/rules/await-interactions.md) | Interactions should be awaited | 🔧 | <ul><li>addon-interactions</li><li>recommended</li></ul> |
| [`storybook/csf-component`](./docs/rules/csf-component.md) | The component property should be set | | <ul><li>csf</li></ul> |
| [`storybook/default-exports`](./docs/rules/default-exports.md) | Story files should have a default export | 🔧 | <ul><li>csf</li><li>recommended</li></ul> |
| [`storybook/hierarchy-separator`](./docs/rules/hierarchy-separator.md) | Deprecated hierachy separator in title property | 🔧 | <ul><li>csf</li><li>recommended</li></ul> |
| [`storybook/no-redundant-story-name`](./docs/rules/no-redundant-story-name.md) | A story should not have a redundant name property | 🔧 | <ul><li>csf</li><li>recommended</li></ul> |
| [`storybook/no-stories-of`](./docs/rules/no-stories-of.md) | storiesOf is deprecated and should not be used | | <ul><li>csf-strict</li></ul> |
| [`storybook/no-title-property-in-meta`](./docs/rules/no-title-property-in-meta.md) | Do not define a title in meta | 🔧 | <ul><li>csf-strict</li></ul> |
| [`storybook/prefer-pascal-case`](./docs/rules/prefer-pascal-case.md) | Stories should use PascalCase | 🔧 | <ul><li>recommended</li></ul> |
| [`storybook/story-exports`](./docs/rules/story-exports.md) | A story file must contain at least one story export | 🔧 | <ul><li>recommended</li><li>csf</li></ul> |
| [`storybook/use-storybook-expect`](./docs/rules/use-storybook-expect.md) | Use expect from `@storybook/jest` | 🔧 | <ul><li>addon-interactions</li><li>recommended</li></ul> |
| [`storybook/use-storybook-testing-library`](./docs/rules/use-storybook-testing-library.md) | Do not use testing-library directly on stories | 🔧 | <ul><li>addon-interactions</li><li>recommended</li></ul> |

@@ -98,0 +116,0 @@ <!-- RULES-LIST:END -->

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc