Skip to content

Commit 92c47e4

Browse files
committed
update story globs
1 parent 817e950 commit 92c47e4

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Optionally, you can override, add or disable rules settings. You likely don't wa
9797
"overrides": [
9898
{
9999
// or whatever matches stories specified in .storybook/main.js
100-
"files": ['*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],
100+
"files": ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],
101101
"rules": {
102102
// example of overriding a rule
103103
'storybook/hierarchy-separator': 'error',
@@ -137,7 +137,7 @@ export default [
137137

138138
...storybook.configs['flat/recommended'],
139139
{
140-
files: ['*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],
140+
files: ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],
141141
rules: {
142142
// example of overriding a rule
143143
'storybook/hierarchy-separator': 'error',

docs/rules/hierarchy-separator.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ For more details about this change: https://github.com/storybookjs/storybook/blo
3535
To automatically migrate all of your codebase and fix this issue, run this codemod in the root folder of your project:
3636

3737
```sh
38-
npx sb@next migrate upgrade-hierarchy-separators --glob="*/**/*.stories.@(tsx|jsx|ts|js)"
38+
npx storybook@latest migrate upgrade-hierarchy-separators --glob="*/**/*.stories.@(tsx|jsx|ts|js)"
3939
```

docs/rules/no-stories-of.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ For more information about the change from `storiesOf` to `CSF`, read here: http
5252
To automatically migrate all of your codebase, run this codemod in the root folder of your project:
5353

5454
```sh
55-
npx sb@next migrate storiesof-to-csf --glob="*/**/*.stories.@(tsx|jsx|ts|js)"
55+
npx storybook@latest migrate storiesof-to-csf --glob="*/**/*.stories.@(tsx|jsx|ts|js)"
5656
```

tools/utils/updates.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export function formatSingleRule(rules: TCategory['rules'], ruleId: string) {
3333

3434
export const SUPPORTED_EXTENSIONS = ['ts', 'tsx', 'js', 'jsx', 'mjs', 'cjs']
3535
export const STORIES_GLOBS = [
36-
`'*.stories.@(${SUPPORTED_EXTENSIONS.join('|')})'`,
37-
`'*.story.@(${SUPPORTED_EXTENSIONS.join('|')})'`,
36+
`'**/*.stories.@(${SUPPORTED_EXTENSIONS.join('|')})'`,
37+
`'**/*.story.@(${SUPPORTED_EXTENSIONS.join('|')})'`,
3838
]
3939

4040
// Other files that will be linted

0 commit comments

Comments
 (0)