From a70a9281eb2a080e0758be21a1886cce18df4077 Mon Sep 17 00:00:00 2001 From: Aasim Attia Date: Sun, 10 Dec 2023 17:22:43 +0200 Subject: [PATCH] Move frontend to Vite 5 (#2775) * merge squashed - A couple of CJS modules into ESM (config mostly) - Vite complains about node.js modules: fixed `useIsMatchingLocation.ts` > or use rollupOptions in vite.config.ts > ref: https://github.com/saleor/saleor-dashboard/blob/f0e4f59d97e2a8c3e22bd2af7b7ce68a361fc9a4/vite.config.js#L6 - Adjust Storybook to work with Vite: use @storybook/test - Use SWC for jest tranformations - Remove unused deps: - ts-jest: replaced with @swc/jest, typecheck by `tsc` - babel plugins - @svgr/plugin-jsx: not used - @testing-library/user-event: handled by @storybook/test - @typescript-eslint/utils: was not plugged in - tsup, esbuild-plugin-svgr: will look into that later - Install Vite required deps, and remove craco/webpack deps - Adjust SVG to work with Vite as components - Fixed `Step.tsx`: I dont know if one should be swaped for the other, but there should be no slash - Initial formating and linting: - removed empty object params - sorting imports, etc.. * prettier: fix pattern * coverage: sb coverage report isnt working * Add missing pieces * `yarn lint --fix` * fix: scripts permissions * tsc: cut errors in half * fix: remove `react-app-env.d.ts` * tsc: all fixed, except `react-data-grid` types issue * eslint: ignore env-config.js * eslint: Align ci with config * msw: bypass testing warnings ref: https://stackoverflow.com/questions/68024935/msw-logging-warnings-for-unhandled-supertest-requests * rebase: and fix things * Adjust to current `graphql-codegen` no ESM support * Remove vite plugin and use built-in methods * rebase: and some fixes * quick fix + `corepack use yarn@1.22.19` * Fix build errors --------- Co-authored-by: Charles Bochet --- .github/workflows/ci-front.yaml | 2 +- .vscode/settings.json | 8 +- front/{.eslintrc-ci.js => .eslintrc-ci.cjs} | 2 +- front/{.eslintrc.js => .eslintrc.cjs} | 200 +- front/.gitignore | 30 +- front/.prettierignore | 3 + front/.prettierrc | 2 +- front/.storybook/main.js | 94 - front/.storybook/main.ts | 45 + front/.storybook/preview-head.html | 5 + front/.storybook/preview.ts | 29 +- ...ner-jest.js => test-runner-jest.config.js} | 6 +- front/.swcrc | 31 + front/README.md | 1 + ...degen-metadata.js => codegen-metadata.cjs} | 0 front/{codegen.js => codegen.cjs} | 0 front/craco.config.js | 48 - front/{public => }/index.html | 26 +- front/jest.config.js | 22 +- front/{nyc.config.js => nyc.config.cjs} | 10 +- front/package.json | 213 +- front/public/env-config.js | 2 +- front/public/robots.txt | 3 - front/src/hooks/useIsMatchingLocation.ts | 3 +- front/src/index.tsx | 5 +- .../modules/apollo/services/apollo.factory.ts | 1 - front/src/modules/apollo/utils/index.ts | 7 +- .../sign-in-up/components/SignInUpForm.tsx | 4 +- .../command-menu/components/CommandMenu.tsx | 242 +- .../__stories__/CommandMenu.stories.tsx | 3 +- .../modules/favorites/utils/mapFavorites.ts | 16 +- .../components/KeyboardShortcutMenu.tsx | 30 +- .../components/MobileNavigationBar.tsx | 12 +- .../ApolloMetadataClientProvider.tsx | 1 - ...atFieldMetadataItemsAsFilterDefinitions.ts | 28 +- .../components/RecordShowPage.tsx | 24 +- .../field/meta-types/hooks/useLinkField.ts | 4 +- .../field/meta-types/hooks/useNumberField.ts | 4 +- .../__stories__/BooleanFieldInput.stories.tsx | 5 +- .../__stories__/DateFieldInput.stories.tsx | 9 +- .../__stories__/EmailFieldInput.stories.tsx | 13 +- .../__stories__/NumberFieldInput.stories.tsx | 13 +- .../__stories__/PhoneFieldInput.stories.tsx | 13 +- .../__stories__/RatingFieldInput.stories.tsx | 5 +- .../RelationFieldInput.stories.tsx | 7 +- .../__stories__/TextFieldInput.stories.tsx | 13 +- .../field/types/guards/assertFieldMetadata.ts | 50 +- .../getRecordOptimisticEffectDefinition.ts | 2 +- .../hooks/useGenerateFindManyRecordsQuery.ts | 8 +- .../components/RecordBoardInternalEffect.tsx | 2 +- .../internal/useRecordBoardColumnsInternal.ts | 15 +- .../RecordBoardOptionsDropdownContent.tsx | 4 +- .../TableOptionsDropdownContent.tsx | 4 +- .../allRowsSelectedStatusSelector.ts | 4 +- .../SingleEntitySelect.stories.tsx | 3 +- ...gsObjectFieldTypeSelectSection.stories.tsx | 2 +- .../data-model/hooks/useFieldPreview.ts | 4 +- ...ingsObjectDisabledMenuDropDown.stories.tsx | 7 +- .../spreadsheet-import/components/Table.tsx | 1 + .../components/SelectColumn.tsx | 1 + .../components/SelectHeaderTable.tsx | 9 +- .../UploadStep/components/DropZone.tsx | 12 +- .../UploadStep/components/columns.tsx | 3 +- .../ValidationStep/ValidationStep.tsx | 21 +- .../ValidationStep/components/columns.tsx | 9 +- .../utils/findUnmatchedRequiredFields.ts | 5 +- .../utils/generateExampleRow.ts | 11 +- .../ui/display/chip/components/Chip.tsx | 20 +- .../icon/components/IconAddressBook.tsx | 2 +- .../ui/display/icon/components/IconGoogle.tsx | 2 +- .../icon/components/IconTwentyStar.tsx | 2 +- .../icon/components/IconTwentyStarFilled.tsx | 2 +- .../components/__stories__/Status.stories.tsx | 5 +- .../components/__stories__/Tag.stories.tsx | 5 +- .../OverflowTextWithTooltip.stories.tsx | 2 +- .../ui/input/button/components/Button.tsx | 12 +- .../button/components/FloatingButton.tsx | 4 +- .../button/components/FloatingIconButton.tsx | 8 +- .../components/FloatingIconButtonGroup.tsx | 8 +- .../ui/input/button/components/IconButton.tsx | 12 +- .../button/components/IconButtonGroup.tsx | 4 +- .../input/button/components/LightButton.tsx | 8 +- .../button/components/LightIconButton.tsx | 8 +- .../button/components/RoundedIconButton.tsx | 4 +- .../__stories__/MainButton.stories.tsx | 5 +- .../__stories__/RoundedIconButton.stories.tsx | 5 +- .../__stories__/IconPicker.stories.tsx | 3 +- .../components/__stories__/Select.stories.tsx | 2 +- .../__stories__/DatePicker.stories.tsx | 3 +- .../__stories__/DropdownMenu.stories.tsx | 3 +- .../modules/ui/layout/tab/components/Tab.tsx | 4 +- .../__stories__/Tablist.stories.tsx | 3 +- .../ui/layout/table/components/TableCell.tsx | 4 +- .../layout/table/components/TableHeader.tsx | 4 +- .../layout/table/components/TableSection.tsx | 3 +- .../__stories__/ContactLink.stories.tsx | 4 +- .../__stories__/RawLink.stories.tsx | 5 +- .../__stories__/RoundedLink.stories.tsx | 5 +- .../__stories__/SocialLink.stories.tsx | 5 +- .../components/NavigationDrawer.tsx | 4 +- .../NavigationDrawerItem.stories.tsx | 8 +- .../navigation/step-bar/components/Step.tsx | 2 +- .../src/modules/ui/theme/constants/effects.ts | 57 +- .../hotkey/hooks/useScopedHotkeys.ts | 1 - .../hotkey/hooks/useSequenceScopedHotkeys.ts | 3 +- front/src/pages/auth/CreateProfile.tsx | 2 +- .../__stories__/CreateProfile.stories.tsx | 2 +- .../__stories__/CreateWorkspace.stories.tsx | 2 +- .../auth/__stories__/SignInUp.stories.tsx | 2 +- .../__stories__/ImpersonateEffect.stories.tsx | 2 +- .../__stories__/NotFound.stories.tsx | 2 +- .../__stories__/Opportunities.stories.tsx | 2 +- .../__stories__/SettingsProfile.stories.tsx | 2 +- .../SettingsWorkspaceMembers.stories.tsx | 2 +- .../__stories__/SettingsNewObject.stories.tsx | 4 +- .../SettingsObjectDetail.stories.tsx | 2 +- .../SettingsObjectEdit.stories.tsx | 2 +- .../SettingsObjectNewFieldStep1.stories.tsx | 2 +- .../SettingsObjectNewFieldStep2.stories.tsx | 2 +- .../__stories__/SettingsObjects.stories.tsx | 2 +- .../SettingsDevelopersApiKeys.stories.tsx | 2 +- ...ettingsDevelopersApiKeysDetail.stories.tsx | 2 +- .../SettingsDevelopersApiKeysNew.stories.tsx | 2 +- .../pages/tasks/__stories__/Tasks.stories.tsx | 2 +- front/src/react-app-env.d.ts | 1 - front/src/utils/cookie-storage.ts | 8 +- front/src/vite-env.d.ts | 2 + front/tsconfig.json | 37 +- front/tsconfig.node.json | 10 + front/{tsup.config.js => tsup.config.ts} | 0 front/vite.config.ts | 40 + front/yarn.lock | 11606 +++++----------- 132 files changed, 4428 insertions(+), 8978 deletions(-) rename front/{.eslintrc-ci.js => .eslintrc-ci.cjs} (84%) rename front/{.eslintrc.js => .eslintrc.cjs} (57%) create mode 100644 front/.prettierignore delete mode 100644 front/.storybook/main.js create mode 100644 front/.storybook/main.ts rename front/.storybook/{test-runner-jest.js => test-runner-jest.config.js} (61%) create mode 100644 front/.swcrc create mode 100644 front/README.md rename front/{codegen-metadata.js => codegen-metadata.cjs} (100%) rename front/{codegen.js => codegen.cjs} (100%) delete mode 100644 front/craco.config.js rename front/{public => }/index.html (74%) rename front/{nyc.config.js => nyc.config.cjs} (74%) delete mode 100644 front/public/robots.txt delete mode 100644 front/src/react-app-env.d.ts create mode 100644 front/src/vite-env.d.ts create mode 100644 front/tsconfig.node.json rename front/{tsup.config.js => tsup.config.ts} (100%) create mode 100644 front/vite.config.ts diff --git a/.github/workflows/ci-front.yaml b/.github/workflows/ci-front.yaml index 496b8e434..56c8517f3 100644 --- a/.github/workflows/ci-front.yaml +++ b/.github/workflows/ci-front.yaml @@ -145,7 +145,7 @@ jobs: - name: Front / Install Dependencies run: cd front && yarn - name: Front / Run linter - run: cd front && yarn lint --config .eslintrc-ci.js + run: cd front && yarn lint --config .eslintrc-ci.cjs front-jest: needs: front-yarn-install runs-on: ubuntu-latest diff --git a/.vscode/settings.json b/.vscode/settings.json index 3f4b28eeb..c33ef9aea 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -38,5 +38,11 @@ "cSpell.words": [ "twentyhq" ], - "typescript.preferences.importModuleSpecifier": "non-relative" + "typescript.preferences.importModuleSpecifier": "non-relative", + "[javascript][typescript][typescriptreact]": { + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.addMissingImports": "always" + } + } } \ No newline at end of file diff --git a/front/.eslintrc-ci.js b/front/.eslintrc-ci.cjs similarity index 84% rename from front/.eslintrc-ci.js rename to front/.eslintrc-ci.cjs index 53a455b90..9d6e8e979 100644 --- a/front/.eslintrc-ci.js +++ b/front/.eslintrc-ci.cjs @@ -8,7 +8,7 @@ module.exports = { }, ], extends: [ - './.eslintrc.js' + './.eslintrc.cjs' ], rules: { 'no-console': 'error', diff --git a/front/.eslintrc.js b/front/.eslintrc.cjs similarity index 57% rename from front/.eslintrc.js rename to front/.eslintrc.cjs index d431859be..b9f9d2051 100644 --- a/front/.eslintrc.js +++ b/front/.eslintrc.cjs @@ -1,37 +1,118 @@ module.exports = { parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.json', - tsconfigRootDir: __dirname, - sourceType: 'module', - ecmaVersion: "2023" - }, - plugins: [ - '@typescript-eslint/eslint-plugin', - 'unused-imports', - 'simple-import-sort', - 'prefer-arrow', - 'import', - 'twenty', - ], - extends: [ - 'plugin:@typescript-eslint/recommended', - 'plugin:prettier/recommended', - 'plugin:storybook/recommended', - 'plugin:react/recommended', - 'plugin:react-hooks/recommended', - ], root: true, env: { + browser: true, node: true, jest: true, }, + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + project: ['./tsconfig.json', './tsconfig.node.json'], + tsconfigRootDir: __dirname, + }, + rules: { + '@typescript-eslint/interface-name-prefix': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': 'off', + 'simple-import-sort/imports': 'error', + 'simple-import-sort/exports': 'error', + 'twenty/effect-components': 'error', + 'twenty/no-hardcoded-colors': 'error', + 'twenty/matching-state-variable': 'error', + 'twenty/component-props-naming': 'error', + 'twenty/sort-css-properties-alphabetically': 'error', + 'twenty/styled-components-prefixed-with-styled': 'error', + 'twenty/no-state-useref': 'error', + 'func-style': ['error', 'declaration', { allowArrowFunctions: true }], + 'no-unused-vars': 'off', + 'react/jsx-props-no-spreading': [ + 'error', + { + explicitSpread: 'ignore', + }, + ], + 'react-hooks/exhaustive-deps': [ + 'warn', + { + additionalHooks: 'useRecoilCallback', + }, + ], + 'unused-imports/no-unused-imports': 'warn', + 'unused-imports/no-unused-vars': [ + 'warn', + { + vars: 'all', + varsIgnorePattern: '^_', + args: 'after-used', + argsIgnorePattern: '^_', + }, + ], + 'no-restricted-imports': [ + 'error', + { + patterns: [ + { + group: ['@tabler/icons-react'], + message: 'Icon imports are only allowed for `@/ui/icon`', + }, + { + group: ['react-hotkeys-web-hook'], + importNames: ['useHotkeys'], + message: 'Please use the custom wrapper: `useScopedHotkeys`', + }, + ], + }, + ], + '@typescript-eslint/consistent-type-imports': [ + 'error', + { prefer: 'no-type-imports' }, + ], + 'no-console': ['warn', { allow: ['group', 'groupCollapsed', 'groupEnd'] }], + // 'react-refresh/only-export-components': [ + // 'warn', + // { allowConstantExport: true }, + // ], + }, + settings: { + react: { + version: 'detect', + }, + }, + extends: [ + 'plugin:@typescript-eslint/recommended', + 'eslint:recommended', + 'plugin:react/recommended', + 'plugin:react-hooks/recommended', + 'plugin:prettier/recommended', + 'plugin:storybook/recommended', + ], + plugins: [ + '@typescript-eslint/eslint-plugin', + 'simple-import-sort', + 'unused-imports', + 'prefer-arrow', + 'twenty', + 'react-refresh', + ], + ignorePatterns: [ + 'mockServiceWorker.js', + '**/generated*/*', + '.eslintrc.cjs', + '*.config.cjs', + '*.config.ts', + '*config.js', + 'codegen*', + ], overrides: [ { files: ['*.stories.tsx', '*.test.ts'], rules: { 'no-console': 'off', - } + }, }, { files: ['*.js', '*.jsx', '*.ts', '*.tsx'], @@ -43,7 +124,7 @@ module.exports = { 'react/jsx-uses-react': 'off', 'react/react-in-jsx-scope': 'off', 'no-control-regex': 0, - 'import/no-duplicates': ["error", {"considerQueryString": true}], + 'no-undef': 'off', 'simple-import-sort/imports': [ 'error', { @@ -53,76 +134,19 @@ module.exports = { ['^\\u0000'], ['^\\.\\.(?!/?$)', '^\\.\\./?$'], ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'], - ['^.+\\.?(css)$'] - ] - } + ['^.+\\.?(css)$'], + ], + }, ], 'prefer-arrow/prefer-arrow-functions': [ 'error', { - "disallowPrototype": true, - "singleReturnOnly": false, - "classPropertiesAllowed": false - } - ] - } - }, - ], - ignorePatterns: ['.eslintrc.js', 'codegen*.js', '**/generated*/*', '*.config.js'], - rules: { - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-explicit-any': 'off', - 'simple-import-sort/imports': 'error', - 'simple-import-sort/exports': 'error', - 'twenty/effect-components': 'error', - 'twenty/no-hardcoded-colors': 'error', - 'twenty/matching-state-variable': 'error', - 'twenty/component-props-naming': 'error', - 'twenty/sort-css-properties-alphabetically': 'error', - 'twenty/styled-components-prefixed-with-styled': 'error', - 'twenty/no-state-useref': 'error', - 'func-style':['error', 'declaration', { 'allowArrowFunctions': true }], - "@typescript-eslint/no-unused-vars": "off", - "no-unused-vars": "off", - "react/jsx-props-no-spreading": [ - "error", { - "explicitSpread": "ignore", - } - ], - "react-hooks/exhaustive-deps": [ - "warn", { - "additionalHooks": "useRecoilCallback" - } - ], - "unused-imports/no-unused-imports": "warn", - "unused-imports/no-unused-vars": [ - "warn", - { "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" } - ], - 'no-restricted-imports': [ - 'error', - { - 'patterns': [ - { - 'group': ['@tabler/icons-react'], - 'message': 'Icon imports are only allowed for `@/ui/icon`', - }, - { - 'group': ['react-hotkeys-web-hook'], - "importNames": ["useHotkeys"], - 'message': 'Please use the custom wrapper: `useScopedHotkeys`', + disallowPrototype: true, + singleReturnOnly: false, + classPropertiesAllowed: false, }, ], }, - ], - "@typescript-eslint/consistent-type-imports": ["error", { "prefer": "no-type-imports" }], - 'no-console': ['warn', { allow: ['group', 'groupCollapsed', 'groupEnd'] }], - }, - settings: { - "react": { - "version": "detect" - } - } + }, + ], }; diff --git a/front/.gitignore b/front/.gitignore index ea617b5d6..00cb9385c 100644 --- a/front/.gitignore +++ b/front/.gitignore @@ -1,7 +1,15 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* # dependencies /node_modules +/coverage* /.pnp .pnp.js @@ -12,16 +20,22 @@ build-storybook.log # production /build +dist +dist-ssr -# misc -.DS_Store +# env .env.local .env.development.local .env.test.local .env.production.local -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -.nyc_output +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/front/.prettierignore b/front/.prettierignore new file mode 100644 index 000000000..48f48cec2 --- /dev/null +++ b/front/.prettierignore @@ -0,0 +1,3 @@ +**/generated*/ +*.lock +*.yaml \ No newline at end of file diff --git a/front/.prettierrc b/front/.prettierrc index 9d36f26d8..4510dc5c8 100644 --- a/front/.prettierrc +++ b/front/.prettierrc @@ -2,4 +2,4 @@ "singleQuote": true, "trailingComma": "all", "endOfLine": "auto" -} \ No newline at end of file +} diff --git a/front/.storybook/main.js b/front/.storybook/main.js deleted file mode 100644 index 699315238..000000000 --- a/front/.storybook/main.js +++ /dev/null @@ -1,94 +0,0 @@ -const path = require('path'); - -computeStoriesGlob = () => { - if (process.env.STORYBOOK_SCOPE === 'pages') { - return [ - '../src/pages/**/*.stories.@(js|jsx|ts|tsx)', - '../src/__stories__/*.stories.@(js|jsx|ts|tsx)', - '../src/pages/**/*.docs.mdx', - '../src/__stories__/*.docs.mdx' - ] - } - - if (process.env.STORYBOOK_SCOPE === 'modules') { - return ['../src/modules/**/*.stories.@(js|jsx|ts|tsx)', '../src/modules/**/*.docs.mdx'] - } - - if (process.env.STORYBOOK_SCOPE === 'ui-docs') { - return ['../src/modules/ui/**/*.docs.mdx']; - } - - return ['../src/**/*.stories.@(js|jsx|ts|tsx)', '../src/**/*.docs.mdx'] -}; - -module.exports = { - webpackFinal: (config) => { - config.module.rules.push({ - test: /\.tsx?$/, - exclude: /node_modules/, - use: [ - { - loader: require.resolve('babel-loader'), - options: { - presets: [ - require('@babel/preset-typescript').default, - [ - require('@babel/preset-react').default, - { - runtime: 'automatic', - }, - ], - require('@babel/preset-env').default, - ], - }, - }, - ], - }); - config.resolve.extensions.push('.ts', '.tsx'); - config.module.rules.push({ - test: /\.mjs$/, - include: /node_modules/, - type: 'javascript/auto', - }); - config.module.rules.push({ - test: /\.svg$/, - use: [ - { - loader: '@svgr/webpack', - }, - { - loader: 'file-loader', - options: { - name: 'static/media/[path][name].[ext]', - }, - }, - ], - type: 'javascript/auto', - issuer: { - and: [/\.(ts|tsx|js|jsx|md|mdx)$/], - }, - }); - config.resolve.extensions.push('.mjs'); - config.resolve.alias = { - ...config.resolve.alias, - '~': path.resolve(__dirname, '../src'), - '@': path.resolve(__dirname, '../src/modules'), - }; - return config; - }, - stories: computeStoriesGlob(), - addons: [ - '@storybook/addon-links', - '@storybook/addon-essentials', - '@storybook/addon-interactions', - '@storybook/addon-coverage', - '@storybook/addon-styling', - 'storybook-addon-pseudo-states', - 'storybook-addon-cookie', - ], - docs: { autodocs: false }, - framework: { - name: '@storybook/react-webpack5', - options: {}, - }, -}; diff --git a/front/.storybook/main.ts b/front/.storybook/main.ts new file mode 100644 index 000000000..ccc903898 --- /dev/null +++ b/front/.storybook/main.ts @@ -0,0 +1,45 @@ +import type { StorybookConfig } from '@storybook/react-vite'; + +const computeStoriesGlob = () => { + if (process.env.STORYBOOK_SCOPE === 'pages') { + return [ + '../src/pages/**/*.stories.@(js|jsx|ts|tsx)', + '../src/__stories__/*.stories.@(js|jsx|ts|tsx)', + '../src/pages/**/*.docs.mdx', + '../src/__stories__/*.docs.mdx' + ] + } + + if (process.env.STORYBOOK_SCOPE === 'modules') { + return ['../src/modules/**/*.stories.@(js|jsx|ts|tsx)', '../src/modules/**/*.docs.mdx'] + } + + if (process.env.STORYBOOK_SCOPE === 'ui-docs') { + return ['../src/modules/ui/**/*.docs.mdx']; + } + + return ['../src/**/*.docs.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'] +}; + +const config: StorybookConfig = { + stories: computeStoriesGlob(), + staticDirs: ['../public'], + addons: [ + '@storybook/addon-links', + '@storybook/addon-essentials', + '@storybook/addon-onboarding', + '@storybook/addon-interactions', + '@storybook/addon-coverage', + '@storybook/addon-themes', + 'storybook-addon-cookie', + 'storybook-addon-pseudo-states', + ], + framework: { + name: '@storybook/react-vite', + options: {}, + }, + docs: { + autodocs: false, + }, +}; +export default config; diff --git a/front/.storybook/preview-head.html b/front/.storybook/preview-head.html index b846fe879..06bfbae2f 100644 --- a/front/.storybook/preview-head.html +++ b/front/.storybook/preview-head.html @@ -2,7 +2,12 @@ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet" /> + + +