Skip to content

Commit 2967e20

Browse files
committed
Revert "Enable strict mode in storybook on a per story basis (#3333)"
This reverts commit 7bf553f.
1 parent 7bf553f commit 2967e20

File tree

5 files changed

+6
-82
lines changed

5 files changed

+6
-82
lines changed

.storybook/custom-addons/strictmode/index.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

.storybook/custom-addons/strictmode/register.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

.storybook/main.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ module.exports = {
1111
'storybook-dark-mode',
1212
'./custom-addons/provider/register',
1313
'./custom-addons/descriptions/register',
14-
'./custom-addons/theme/register',
15-
'./custom-addons/strictmode/register'
14+
'./custom-addons/theme/register'
1615
],
1716
typescript: {
1817
check: false,
1918
reactDocgen: false
20-
}
19+
},
20+
reactOptions: {
21+
strictMode: process.env.STRICT_MODE
22+
},
2123
};

.storybook/preview.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {configureActions} from '@storybook/addon-actions';
22
import React from 'react';
33
import {VerticalCenter} from './layout';
44
import {withProviderSwitcher} from './custom-addons/provider';
5-
import {withStrictModeSwitcher} from './custom-addons/strictmode';
65

76
// decorator order matters, the last one will be the outer most
87

@@ -30,6 +29,5 @@ export const decorators = [
3029
<Story />
3130
</VerticalCenter>
3231
),
33-
withStrictModeSwitcher,
3432
withProviderSwitcher
3533
];

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"install-16": "yarn add -W react@^16.8.0 react-dom@^16.8.0 @testing-library/react@^12 @testing-library/react-hooks@^8",
1313
"install-17": "yarn add -W react@^17 react-dom@^17 @testing-library/react@^12 @testing-library/react-hooks@^8",
1414
"start": "cross-env NODE_ENV=storybook start-storybook -p 9003 --ci -c '.storybook'",
15+
"start-strict": "cross-env NODE_ENV=storybook STRICT_MODE=1 start-storybook -p 9003 --ci -c '.storybook'",
1516
"build:storybook": "build-storybook -c .storybook -o dist/$(git rev-parse HEAD)/storybook",
1617
"build:storybook-16": "build-storybook -c .storybook -o dist/$(git rev-parse HEAD)/storybook-16",
1718
"build:storybook-17": "build-storybook -c .storybook -o dist/$(git rev-parse HEAD)/storybook-17",

0 commit comments

Comments
 (0)