-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: vscode 저장 시 eslint 자동 적용 추가 * chore: 프로젝트별 lint-staged 설정 * chore: .husky pre-push 파일 추가 * chore: .prettierrc 파일 추가 * style: 전체 코드 스타일 적용
- Loading branch information
Showing
25 changed files
with
230 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
## 📝 이슈 개요 | ||
|
||
## ✅ To-do | ||
|
||
- [ ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
## #️⃣ 관련 이슈 | ||
|
||
- # | ||
|
||
## 💡 작업 내용 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
pnpm lint-staged | ||
pnpm build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"printWidth": 120, | ||
"arrowParens": "avoid", | ||
"semi": false, | ||
"endOfLine": "lf", | ||
"useTabs": false, | ||
"tabWidth": 2, | ||
"quoteProps": "as-needed", | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"proseWrap": "preserve" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"eslint.workingDirectories": [{ "mode": "auto" }], | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
extends: ["@freemed-kit/eslint-config/storybook.js"], | ||
}; | ||
extends: ['@freemed-kit/eslint-config/storybook.js'], | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import type { StorybookConfig } from '@storybook/react-vite' | ||
import { dirname, join, resolve } from 'path' | ||
|
||
function getAbsolutePath(value: string) { | ||
return dirname(require.resolve(join(value, 'package.json'))) | ||
} | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../stories/*.stories.tsx', '../stories/**/*.stories.tsx'], | ||
addons: [getAbsolutePath('@storybook/addon-links'), getAbsolutePath('@storybook/addon-essentials')], | ||
framework: { | ||
name: getAbsolutePath('@storybook/react-vite'), | ||
options: {}, | ||
}, | ||
|
||
core: {}, | ||
|
||
async viteFinal(config, { configType }) { | ||
// customize the Vite config here | ||
return { | ||
...config, | ||
define: { 'process.env': {} }, | ||
resolve: { | ||
alias: [ | ||
{ | ||
find: 'ui', | ||
replacement: resolve(__dirname, '../../../packages/ui/'), | ||
}, | ||
], | ||
}, | ||
} | ||
}, | ||
docs: { | ||
autodocs: true, | ||
}, | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import "@freemed-kit/ui/dist/index.css"; | ||
import '@freemed-kit/ui/dist/index.css' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,65 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { Button } from "@freemed-kit/ui"; | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import { Button } from '@freemed-kit/ui' | ||
|
||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction | ||
const meta: Meta<typeof Button> = { | ||
title: "Example/Button", | ||
title: 'Example/Button', | ||
component: Button, | ||
tags: ["autodocs"], | ||
tags: ['autodocs'], | ||
argTypes: { | ||
children: { control: "text", defaultValue: "Button" }, | ||
children: { control: 'text', defaultValue: 'Button' }, | ||
variant: { | ||
control: "select", | ||
options: [ | ||
"primary", | ||
"destructive", | ||
"outline", | ||
"secondary", | ||
"ghost", | ||
"link", | ||
], | ||
control: 'select', | ||
options: ['primary', 'destructive', 'outline', 'secondary', 'ghost', 'link'], | ||
}, | ||
size: { control: "radio", options: ["sm", "md", "lg", "icon"] }, | ||
asChild: { control: "boolean" }, | ||
onClick: { action: "clicked", type: "function" }, | ||
size: { control: 'radio', options: ['sm', 'md', 'lg', 'icon'] }, | ||
asChild: { control: 'boolean' }, | ||
onClick: { action: 'clicked', type: 'function' }, | ||
}, | ||
}; | ||
} | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Button>; | ||
export default meta | ||
type Story = StoryObj<typeof Button> | ||
|
||
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args | ||
export const Default: Story = { | ||
args: { | ||
variant: "default", | ||
children: "Button", | ||
variant: 'default', | ||
children: 'Button', | ||
}, | ||
}; | ||
} | ||
|
||
export const Destructive: Story = { | ||
args: { | ||
variant: "destructive", | ||
children: "Destructive Button", | ||
variant: 'destructive', | ||
children: 'Destructive Button', | ||
}, | ||
}; | ||
} | ||
|
||
export const Outline: Story = { | ||
args: { | ||
variant: "outline", | ||
children: "Outline Button", | ||
variant: 'outline', | ||
children: 'Outline Button', | ||
}, | ||
}; | ||
} | ||
|
||
export const Secondary: Story = { | ||
args: { | ||
variant: "secondary", | ||
children: "Secondary Button", | ||
variant: 'secondary', | ||
children: 'Secondary Button', | ||
}, | ||
}; | ||
} | ||
|
||
export const Ghost: Story = { | ||
args: { | ||
variant: "ghost", | ||
children: "Ghost Button", | ||
variant: 'ghost', | ||
children: 'Ghost Button', | ||
}, | ||
}; | ||
} | ||
|
||
export const Link: Story = { | ||
args: { | ||
variant: "link", | ||
children: "Link Button", | ||
variant: 'link', | ||
children: 'Link Button', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { defineConfig } from "vite"; | ||
import react from "@vitejs/plugin-react"; | ||
import tsconfigPaths from "vite-tsconfig-paths"; | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react' | ||
import tsconfigPaths from 'vite-tsconfig-paths' | ||
|
||
export default defineConfig({ | ||
plugins: [react(), tsconfigPaths()], | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.