Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"es2021": true,
"node": true
},

"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"next/core-web-vitals"
"next/core-web-vitals",
"plugin:storybook/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand All @@ -38,13 +38,21 @@
"error",
{
"selector": "typeAlias",
"format": ["PascalCase"],
"prefix": ["T"]
"format": [
"PascalCase"
],
"prefix": [
"T"
]
},
{
"selector": "interface",
"format": ["PascalCase"],
"prefix": ["I"]
"format": [
"PascalCase"
],
"prefix": [
"I"
]
}
]
},
Expand All @@ -53,4 +61,4 @@
"version": "detect"
}
}
}
}
24 changes: 24 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Workflow name
name: 'Chromatic Deployment'

# Event for the workflow
on: push

# List of jobs
jobs:
chromatic:
name: 'Run Chromatic'
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: yarn
#👇 Adds Chromatic as a step in the workflow
- uses: chromaui/action@latest
# Options required for Chromatic's GitHub Action
with:
#👇 Chromatic projectToken, see https://storybook.js.org/tutorials/intro-to-storybook/react/ko/deploy/ to obtain it
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ next-env.d.ts

# Sentry Config File
.env.sentry-build-plugin

*storybook.log
17 changes: 17 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { StorybookConfig } from '@storybook/experimental-nextjs-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@chromatic-com/storybook',
'@storybook/experimental-addon-test',
],
framework: {
name: '@storybook/experimental-nextjs-vite',
options: {},
},
staticDirs: ['../public'],
};
export default config;
18 changes: 18 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { Preview } from '@storybook/react';
import '../src/app/globals.css';

const preview: Preview = {
parameters: {
actions: {
handles: ['onClick', 'onSubmit', 'onChange'],
},
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
77 changes: 0 additions & 77 deletions cypress/e2e/dashboard.cy.ts

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ const config: Config = {
moduleNameMapper: {
// ...
'^@/components/(.*)$': '<rootDir>/components/$1',
'^@hooks/(.*)$': '<rootDir>/src/hooks/$1',
},
moduleDirectories: ['node_modules', '<rootDir>'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
};

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
Expand Down
1 change: 1 addition & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import 'jest-canvas-mock';
Loading