Skip to content

Commit 563a6ce

Browse files
authored
chore(storybook): upgrade to sb10 (#2594)
* . * . * node 24 * .nvmrc
1 parent cadf14c commit 563a6ce

File tree

8 files changed

+694
-356
lines changed

8 files changed

+694
-356
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- run: corepack enable
6262
- uses: actions/setup-node@v4
6363
with:
64-
node-version-file: '.node-version'
64+
node-version-file: '.nvmrc'
6565
cache: 'yarn'
6666
- run: yarn install
6767
- run: yarn build

.node-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.12.0

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { StorybookConfig } from '@storybook/react-vite'
2-
import { svg } from './favicon'
2+
import { svg } from './favicon.ts'
33

44
const config: StorybookConfig = {
55
staticDirs: ['./public'],

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,23 @@ https://pmndrs.github.io/drei
802802

803803
### INSTALL
804804

805+
Pre-requisites:
806+
807+
- Install [nvm](https://github.com/nvm-sh/nvm), then:
808+
```sh
809+
$ nvm install
810+
$ nvm use
811+
$ node -v # make sure your version satisfies package.json#engines.node
812+
```
813+
nb: if you want this node version to be your default nvm's one: `nvm alias default node`
814+
- Install yarn, with:
815+
```sh
816+
$ corepack enable
817+
$ corepack prepare --activate # it reads "packageManager"
818+
$ yarn -v # make sure your version satisfies package.json#engines.yarn
819+
```
820+
805821
```sh
806-
$ corepack enable
807822
$ yarn install
808823
```
809824

eslint.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { fixupConfigRules, fixupPluginRules } from '@eslint/compat'
22
import typescriptEslint from '@typescript-eslint/eslint-plugin'
33
import react from 'eslint-plugin-react'
44
import reactHooks from 'eslint-plugin-react-hooks'
5+
import storybook from 'eslint-plugin-storybook'
56
import tsParser from '@typescript-eslint/parser'
67
import path from 'node:path'
78
import { fileURLToPath } from 'node:url'
@@ -20,7 +21,8 @@ export default [
2021
{
2122
ignores: ['.storybook/public', '**/dist/', '**/node_modules/', '**/storybook-static/'],
2223
},
23-
...fixupConfigRules(compat.extends('plugin:react-hooks/recommended', 'plugin:storybook/recommended', 'prettier')),
24+
...fixupConfigRules(compat.extends('plugin:react-hooks/recommended', 'prettier')),
25+
...storybook.configs['flat/recommended'],
2426
{
2527
plugins: {
2628
'@typescript-eslint': typescriptEslint,

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"@babel/preset-env": "^7.26.0",
7979
"@babel/preset-react": "^7.25.9",
8080
"@babel/preset-typescript": "^7.26.0",
81-
"@chromatic-com/storybook": "^4.1.0",
81+
"@chromatic-com/storybook": "^4.1.3",
8282
"@eslint/compat": "^1.2.3",
8383
"@eslint/eslintrc": "^3.2.0",
8484
"@eslint/js": "^9.15.0",
@@ -88,8 +88,8 @@
8888
"@rollup/plugin-commonjs": "^19.0.0",
8989
"@rollup/plugin-json": "^4.1.0",
9090
"@rollup/plugin-node-resolve": "^13.0.0",
91-
"@storybook/addon-docs": "^9.1.2",
92-
"@storybook/react-vite": "^9.1.2",
91+
"@storybook/addon-docs": "^10.1.11",
92+
"@storybook/react-vite": "^10.1.11",
9393
"@types/react": "^19.0.2",
9494
"@types/react-dom": "^19.0.2",
9595
"@types/seedrandom": "^3",
@@ -105,7 +105,7 @@
105105
"eslint-config-prettier": "^9.1.0",
106106
"eslint-plugin-react": "^7.37.2",
107107
"eslint-plugin-react-hooks": "^5.0.0",
108-
"eslint-plugin-storybook": "^9.1.2",
108+
"eslint-plugin-storybook": "^10.1.11",
109109
"husky": "^9.1.7",
110110
"json": "^11.0.0",
111111
"prettier": "^3.3.3",
@@ -120,7 +120,7 @@
120120
"seedrandom": "^3.0.5",
121121
"semantic-release": "^24.2.0",
122122
"serve": "^14.2.4",
123-
"storybook": "^9.1.2",
123+
"storybook": "^10.1.11",
124124
"three": "^0.159.0",
125125
"ts-node": "^10.9.2",
126126
"typescript": "^5.6.3",

0 commit comments

Comments
 (0)