Skip to content

Commit 49811a2

Browse files
committed
feat: add main cof
1 parent 8c6eaa1 commit 49811a2

23 files changed

+9194
-203
lines changed

.env.example

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

.env.test

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

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"eslint:recommended",
1111
"plugin:@typescript-eslint/eslint-recommended",
1212
"plugin:@typescript-eslint/recommended",
13-
"prettier"
13+
"prettier",
14+
"plugin:react/recommended",
15+
"plugin:storybook/recommended",
16+
"plugin:jsx-a11y/recommended"
1417
],
1518
"rules": {}
1619
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ build/
2929

3030
# .swc
3131
.swc/
32+
33+
# storybook
34+
storybook-static/

.storybook/main.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
"stories": [
3+
"../src/**/*.stories.mdx",
4+
"../src/**/*.stories.@(js|jsx|ts|tsx)"
5+
],
6+
"addons": [
7+
"@storybook/addon-links",
8+
"@storybook/addon-essentials",
9+
"@storybook/addon-interactions"
10+
],
11+
"framework": "@storybook/react"
12+
}

.storybook/preview.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export const parameters = {
2+
actions: { argTypesRegex: "^on[A-Z].*" },
3+
controls: {
4+
matchers: {
5+
color: /(background|color)$/i,
6+
date: /Date$/,
7+
},
8+
},
9+
}

.swcrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
{
22
"jsc": {
33
"parser": {
4-
"syntax": "typescript"
4+
"syntax": "typescript",
5+
"tsx": true
56
},
67
"target": "es2021"
78
},
89
"module": {
910
"type": "commonjs"
1011
},
12+
"transform": {
13+
"react": {
14+
"runtime": "automatic"
15+
}
16+
},
1117
"sourceMaps": true
1218
}

jest-setup.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import '@testing-library/jest-dom';

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ module.exports = {
33
transform: {
44
'^.+\\.(t|j)s$': '@swc/jest',
55
},
6-
setupFiles: ['dotenv/config'],
76
testPathIgnorePatterns: ['/node_modules/', '/build/'],
7+
setupFilesAfterEnv: ['<rootDir>/jest-setup.js'],
88
};

nodemon.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"watch": ["src"],
33
"ext": "ts,json",
4-
"ignore": ["src/**/*.spec.ts", "src/**/*.test.ts"],
4+
"ignore": ["src/**/*.spec.{ts,tsx}", "src/**/*.test.{tsx,ts}"],
55
"exec": "yarn develop"
66
}

0 commit comments

Comments
 (0)