Skip to content

Commit 67ebd41

Browse files
authored
Merge pull request #134 from Boggle-Boggle/refactor/129
[Refactor/129] 버튼컴포넌트 리팩토링
2 parents 7b0aa23 + 7c730d7 commit 67ebd41

13 files changed

Lines changed: 1088 additions & 38 deletions

File tree

.eslintrc.cjs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,7 @@ module.exports = {
99
project: './tsconfig.json',
1010
tsconfigRootDir: './',
1111
},
12-
extends: [
13-
'eslint:recommended',
14-
'plugin:@typescript-eslint/recommended',
15-
'plugin:react-hooks/recommended',
16-
'airbnb',
17-
'airbnb/hooks',
18-
'airbnb-typescript',
19-
'prettier',
20-
],
12+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'airbnb', 'airbnb/hooks', 'airbnb-typescript', 'prettier', 'plugin:storybook/recommended'],
2113
ignorePatterns: ['dist', '.eslintrc.cjs', 'vite.config.js', 'tailwind.config.cjs'],
2214
plugins: ['@typescript-eslint', 'react-refresh'],
2315
rules: {

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ dist-ssr
2525
*.sln
2626
*.sw?
2727

28+
29+
*storybook.log
30+
storybook-static

.storybook/main.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { StorybookConfig } from '@storybook/react-vite';
2+
3+
const config: StorybookConfig = {
4+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5+
addons: [],
6+
framework: {
7+
name: '@storybook/react-vite',
8+
options: {},
9+
},
10+
};
11+
export default config;

.storybook/preview.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import '../src/main.css';
2+
3+
import type { Preview } from '@storybook/react-vite';
4+
5+
const preview: Preview = {
6+
parameters: {
7+
controls: {
8+
matchers: {
9+
color: /(background|color)$/i,
10+
date: /Date$/i,
11+
},
12+
},
13+
},
14+
};
15+
16+
export default preview;

package.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"dev": "vite",
88
"build": "tsc -b && vite build",
99
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10-
"preview": "vite preview"
10+
"preview": "vite preview",
11+
"storybook": "storybook dev -p 6006",
12+
"build-storybook": "storybook build"
1113
},
1214
"dependencies": {
1315
"@react-three/drei": "^9.117.3",
@@ -23,14 +25,17 @@
2325
"zustand": "^4.5.4"
2426
},
2527
"devDependencies": {
28+
"@storybook/react-vite": "^9.0.15",
2629
"@tanstack/react-query": "^5.51.14",
30+
"@types/node": "^24.0.10",
2731
"@types/react": "^18.3.3",
2832
"@types/react-dom": "^18.3.0",
2933
"@types/three": "^0.170.0",
3034
"@typescript-eslint/eslint-plugin": "^7.17.0",
3135
"@typescript-eslint/parser": "^7.17.0",
32-
"@vitejs/plugin-react-swc": "^3.5.0",
36+
"@vitejs/plugin-react-swc": "^3.7.0",
3337
"autoprefixer": "^10.4.19",
38+
"chromatic": "^13.1.2",
3439
"eslint": "^8.57.0",
3540
"eslint-config-airbnb": "^19.0.4",
3641
"eslint-config-airbnb-typescript": "^18.0.0",
@@ -39,13 +44,20 @@
3944
"eslint-plugin-jsx-a11y": "^6.9.0",
4045
"eslint-plugin-react": "^7.35.0",
4146
"eslint-plugin-react-hooks": "^4.6.2",
42-
"eslint-plugin-react-refresh": "^0.4.7",
47+
"eslint-plugin-react-refresh": "^0.4.9",
48+
"eslint-plugin-storybook": "^9.0.15",
4349
"postcss": "^8.4.40",
4450
"prettier": "^3.3.3",
4551
"prettier-plugin-tailwindcss": "^0.6.5",
52+
"storybook": "^9.0.15",
4653
"tailwindcss": "^3.4.7",
47-
"typescript": "^5.2.2",
54+
"typescript": "^5.5.4",
4855
"vite": "^5.3.4",
4956
"vite-plugin-svgr": "^4.3.0"
57+
},
58+
"pnpm": {
59+
"patchedDependencies": {
60+
"ast-types": "patches/ast-types.patch"
61+
}
5062
}
5163
}

patches/ast-types.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/lib/main.d.ts b/lib/main.d.ts
2+
index 9b54fef0086ea0c99368d8a95f2476e5dcd6d9c1..0091ed7f542f0c59a004e31dc1b62b42d26937d5 100644
3+
--- a/lib/main.d.ts
4+
+++ b/lib/main.d.ts
5+
@@ -1,7 +1,7 @@
6+
-import { ASTNode, Type, AnyType, Field } from "./types";
7+
-import { NodePath } from "./node-path";
8+
+import type { ASTNode, Type, AnyType, Field } from "./types";
9+
+import type { NodePath } from "./node-path";
10+
import { namedTypes } from "./gen/namedTypes";
11+
-import { builders } from "./gen/builders";
12+
+import type { builders } from "./gen/builders";
13+
import { Visitor } from "./gen/visitor";
14+
declare const astNodesAreEquivalent: {
15+
(a: any, b: any, problemPath?: any): boolean;

0 commit comments

Comments
 (0)