diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d3fc0e12..5979d515 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -5,17 +5,7 @@ module.exports = { es2021: true, node: true, }, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:react/recommended', - 'plugin:react-hooks/recommended', - 'plugin:jsx-a11y/recommended', - 'plugin:prettier/recommended', - 'plugin:import/recommended', - 'plugin:import/typescript', - 'plugin:@tanstack/query/recommended', - ], + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended', 'plugin:jsx-a11y/recommended', 'plugin:prettier/recommended', 'plugin:import/recommended', 'plugin:import/typescript', 'plugin:@tanstack/query/recommended', 'plugin:storybook/recommended'], parser: '@typescript-eslint/parser', parserOptions: { ecmaFeatures: { diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml new file mode 100644 index 00000000..f578ecfc --- /dev/null +++ b/.github/workflows/chromatic.yml @@ -0,0 +1,27 @@ +name: 'Chromatic Deployment' + +on: pull_request + +jobs: + chromatic: + name: 'Run Chromatic' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - run: yarn + + - uses: chromaui/action@latest + id: chromatic + with: + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} + + - name: comment PR + uses: thollander/actions-comment-pull-request@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + message: '๐storybook: ${{ steps.chromatic.outputs.storybookUrl }}' diff --git a/.gitignore b/.gitignore index 5003245c..3b37c9ad 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,9 @@ dist-ssr .env.local # Local Netlify folder .netlify + +# TypeScript build cache +*.tsbuildinfo + + +*storybook.log diff --git a/.storybook/main.ts b/.storybook/main.ts new file mode 100644 index 00000000..578a8a36 --- /dev/null +++ b/.storybook/main.ts @@ -0,0 +1,15 @@ +import type { StorybookConfig } from '@storybook/react-vite'; + +const config: StorybookConfig = { + stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], + addons: [ + '@storybook/addon-essentials', + '@storybook/addon-onboarding', + '@chromatic-com/storybook', + ], + framework: { + name: '@storybook/react-vite', + options: {}, + }, +}; +export default config; diff --git a/.storybook/preview.ts b/.storybook/preview.ts new file mode 100644 index 00000000..adcda96b --- /dev/null +++ b/.storybook/preview.ts @@ -0,0 +1,14 @@ +import type { Preview } from '@storybook/react'; + +const preview: Preview = { + parameters: { + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/i, + }, + }, + }, +}; + +export default preview; diff --git a/index.html b/index.html index bcf917f4..8c1e49cc 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,10 @@ +
+ {errorMessage || helperText} +
{emailErrorMessage}
- {validationMessages.password} -
- {validationMessages.confirmPassword} -
- {nicknameMessage} -
- {validationMessages.phoneNumber} -
{strategy.strategyTitle}
{errorMessage}