Skip to content

Commit 7bd55eb

Browse files
Merge pull request #33238 from SamuelT-Beslogic/patch-1
Docs: Modernize global unignore recommendation
2 parents 3517e92 + edd2cd2 commit 7bd55eb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

code/lib/eslint-plugin/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,12 @@ This allows for this plugin to also lint your configuration files inside the .st
6262
If you are using [flat config style](https://eslint.org/docs/latest/use/configure/configuration-files-new), add this to your configuration file:
6363

6464
```js
65-
export default [
65+
import { defineConfig, globalIgnores } from 'eslint/config';
66+
67+
export default defineConfig([
68+
globalIgnores(['!.storybook'], "Include Storybook Directory"),
6669
// ...
67-
{
68-
// Inside your .eslintignore file
69-
ignores: ['!.storybook'],
70-
},
71-
];
70+
]);
7271
```
7372

7473
## ESLint compatibility

0 commit comments

Comments
 (0)