Skip to content

Commit

Permalink
chore: upgrade storybook to v8 and fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonours committed Nov 23, 2024
1 parent b927730 commit b94b71a
Show file tree
Hide file tree
Showing 6 changed files with 641 additions and 3,808 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/sanity-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

jobs:
build:
'sanity-checks':
runs-on: ubuntu-latest

steps:
Expand All @@ -23,6 +23,9 @@ jobs:
- name: Install dependencies
run: yarn install --immutable

- name: Typecheck
run: yarn typecheck

- name: Lint Codebase
run: yarn lint

Expand Down
12 changes: 9 additions & 3 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,24 @@ const config: StorybookConfig = {
"../app/**/*.mdx",
"../app/**/*.stories.@(js|jsx|mjs|ts|tsx)",
],

addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-onboarding",
"@storybook/addon-interactions",
"@chromatic-com/storybook"
],

framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},

docs: {},

typescript: {
reactDocgen: "react-docgen-typescript"
}
};
export default config;
3 changes: 1 addition & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import '../app/tailwind.css';
import type { Preview } from "@storybook/react";
import type { Preview } from '@storybook/react';

const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@
},
"devDependencies": {
"@react-router/dev": "^7.0.0",
"@storybook/addon-essentials": "^7.6.12",
"@storybook/addon-interactions": "^7.6.12",
"@storybook/addon-links": "^7.6.12",
"@storybook/addon-onboarding": "^1.0.11",
"@storybook/blocks": "^7.6.12",
"@storybook/react": "^7.6.12",
"@storybook/react-vite": "^7.6.12",
"@storybook/test": "^7.6.12",
"@storybook/addon-essentials": "^8.4.5",
"@storybook/addon-interactions": "^8.4.5",
"@storybook/addon-links": "^8.4.5",
"@storybook/addon-onboarding": "^8.4.5",
"@storybook/blocks": "^8.4.5",
"@storybook/react": "^8.4.5",
"@storybook/react-vite": "^8.4.5",
"@storybook/test": "^8.4.5",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.4.1",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
Expand All @@ -49,10 +50,11 @@
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.6.15",
"eslint-plugin-storybook": "^0.11.1",
"happy-dom": "^13.3.8",
"hygen": "^6.2.11",
"storybook": "^7.6.12",
"postcss": "^8.4.49",
"storybook": "^8.4.5",
"tailwindcss": "^3.4.1",
"typescript": "^5.1.6",
"vite": "^5.1.0",
Expand Down
14 changes: 1 addition & 13 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,7 @@ export default defineConfig({
},
},
}),
!isStorybook &&
reactRouter({
ignoredRouteFiles: ['**/.*'],
future: {
unstable_optimizeDeps: true,
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_lazyRouteDiscovery: true,
v3_singleFetch: true,
v3_routeConfig: true,
},
}),
!isStorybook && reactRouter(),
tsconfigPaths(),
],
});
Loading

0 comments on commit b94b71a

Please sign in to comment.