Skip to content

Commit 73bd6ab

Browse files
Upgrade Storybook 8 to 10
Run via the official upgrade CLI one major at a time with automigrations. Drop unused addons: essentials and interactions are core in Storybook 9+; links, docs and Chromatic were unused (no linkTo, MDX, autodocs, or Chromatic CI). This leaves storybook, @storybook/react-vite and eslint-plugin-storybook as the only Storybook dev dependencies. Exclude stories from the CJS build: Storybook 10 types don't resolve under node10 module resolution. The ESM build still typechecks them. Ignore generated docs/build in eslint: a new eslint-plugin-storybook rule flagged stale typedoc output there. Disable the onboarding checklist and what's new notifications. The lockfile is regenerated as npm could not resolve the major bumps in place.
1 parent 7e94b46 commit 73bd6ab

10 files changed

Lines changed: 4362 additions & 8295 deletions

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
'plugin:react-hooks/recommended',
88
'plugin:storybook/recommended',
99
],
10-
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
ignorePatterns: ['dist', 'docs/build', '.eslintrc.cjs'],
1111
parser: '@typescript-eslint/parser',
1212
plugins: ['react-refresh'],
1313
rules: {

.storybook/main.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ import type { StorybookConfig } from '@storybook/react-vite';
22

33
const config: StorybookConfig = {
44
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5-
addons: [
6-
'@storybook/addon-links',
7-
'@storybook/addon-essentials',
8-
'@chromatic-com/storybook',
9-
'@storybook/addon-interactions',
10-
],
5+
features: {
6+
// No onboarding checklist in the sidebar or menu.
7+
sidebarOnboardingChecklist: false,
8+
menuOnboardingChecklist: false,
9+
},
10+
core: {
11+
disableWhatsNewNotifications: true,
12+
},
1113
framework: {
1214
name: '@storybook/react-vite',
1315
options: {},

.storybook/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Preview } from "@storybook/react";
1+
import type { Preview } from "@storybook/react-vite";
22

33
const preview: Preview = {
44
parameters: {

0 commit comments

Comments
 (0)