feat: Add Storybook for component documentation, testing, and development (#34907)

Co-authored-by: Echo <ChaosExAnima@users.noreply.github.com>
Co-authored-by: Renaud Chaput <renchap@gmail.com>
This commit is contained in:
diondiondion 2025-06-06 11:27:29 +02:00 committed by GitHub
parent 989ca63b59
commit f2cfa4f482
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 1822 additions and 104 deletions

View file

@ -26,8 +26,12 @@
"postinstall": "test -d node_modules/husky && husky || echo \"husky is not installed\"",
"start": "node ./streaming/index.js",
"test": "yarn lint && yarn run typecheck && yarn test:js run",
"test:js": "vitest",
"typecheck": "tsc --noEmit"
"test:js": "vitest --project=legacy-tests",
"test:storybook": "vitest --project=storybook",
"typecheck": "tsc --noEmit",
"storybook": "storybook dev -p 6006",
"build-storybook": "VITE_RUBY_PUBLIC_OUTPUT_DIR='.' VITE_RUBY_PUBLIC_DIR='./storybook-static' storybook build",
"chromatic": "npx chromatic -d storybook-static"
},
"repository": {
"type": "git",
@ -122,6 +126,10 @@
"devDependencies": {
"@eslint/js": "^9.23.0",
"@formatjs/cli": "^6.1.1",
"@storybook/addon-a11y": "^9.0.4",
"@storybook/addon-docs": "^9.0.4",
"@storybook/addon-vitest": "^9.0.4",
"@storybook/react-vite": "^9.0.4",
"@testing-library/dom": "^10.2.0",
"@testing-library/react": "^16.0.0",
"@types/emoji-mart": "3.0.14",
@ -147,6 +155,10 @@
"@types/react-toggle": "^4.0.3",
"@types/redux-immutable": "^4.0.3",
"@types/requestidlecallback": "^0.3.5",
"@vitest/browser": "^3.2.1",
"@vitest/coverage-v8": "^3.2.0",
"@vitest/ui": "^3.2.1",
"chromatic": "^12.1.0",
"eslint": "^9.23.0",
"eslint-import-resolver-typescript": "^4.2.5",
"eslint-plugin-formatjs": "^5.3.1",
@ -156,11 +168,14 @@
"eslint-plugin-promise": "~7.2.1",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-storybook": "^9.0.4",
"globals": "^16.0.0",
"husky": "^9.0.11",
"lint-staged": "^16.0.0",
"playwright": "^1.52.0",
"prettier": "^3.3.3",
"react-test-renderer": "^18.2.0",
"storybook": "^9.0.4",
"stylelint": "^16.19.1",
"stylelint-config-prettier-scss": "^1.0.0",
"stylelint-config-standard-scss": "^15.0.1",
@ -168,13 +183,14 @@
"typescript-eslint": "^8.29.1",
"vite-plugin-rails": "^0.5.0",
"vite-plugin-svgr": "^4.2.0",
"vitest": "^3.1.3"
"vitest": "^3.2.1"
},
"resolutions": {
"@types/react": "^18.2.7",
"@types/react-dom": "^18.2.4",
"kind-of": "^6.0.3",
"vite-plugin-ruby": "^5.1.0"
"vite-plugin-ruby": "^5.1.0",
"vite": "^6.3.5"
},
"peerDependenciesMeta": {
"react": {