Skip to content

Commit d20fe8a

Browse files
authored
Merge pull request storybookjs#31739 from storybookjs/docs-update-eslint-plugin
Docs: Update eslint plugin configuration guide
2 parents 599a363 + 1c6c3ec commit d20fe8a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/configure/integration/eslint-plugin.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,19 @@ export default [
104104
];
105105
```
106106

107+
In case you are using utility functions from tools like `tseslint`, you might need to register the plugin a little differently:
108+
109+
```ts title="eslint.config.ts"
110+
import storybook from 'eslint-plugin-storybook';
111+
import somePlugin from 'some-plugin';
112+
import tseslint from 'typescript-eslint';
113+
114+
export default tseslint.config(
115+
somePlugin,
116+
storybook.configs['flat/recommended'] // notice that it is not destructured
117+
);
118+
```
119+
107120
#### Overriding/disabling rules
108121

109122
Optionally, you can override, add, or disable individual rules. 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.js` file that applies the overrides only to your stories files.

0 commit comments

Comments
 (0)