-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
113 lines (91 loc) ยท 4.68 KB
/
Copy path.coderabbit.yaml
File metadata and controls
113 lines (91 loc) ยท 4.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
language: "ko-KR"
early_access: false
tone_instructions: |
1. ํผ๋๋ฐฑ์ ๋ช
ํํ๊ณ ๊ตฌ์ฒด์ ์ผ๋ก ์์ฑํ๊ณ , ๋ฌธ์ ์์ธ๊ณผ ๊ฐ์ ๋ฐฉ๋ฒ์ ํจ๊ป ์ ์ํ์ธ์.
2. ๋ฆฌ๋ทฐ๋ ๊ต์ก์ ์ธ ๋ฐฉํฅ์ ์งํฅํ๋ฉฐ, ๊ด๋ จ ๊ณต์ ๋ฌธ์ ๋งํฌ๋ฅผ ํจ๊ป ์ถ์ฒํ์ธ์.
3. ๋นํ๋ณด๋ค๋ ๊ฐ์ ์ ์์ ์ฐ์ ํ์ธ์.
4. ์นญ์ฐฌ์ ์งง๊ณ ์ํธ ์๊ฒ ์์ฑํ์ธ์.
reviews:
profile: "assertive"
request_changes_workflow: false
high_level_summary: false
poem: false
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: false
base_branches:
- develop
- main
path_filters:
- "!**/*.lock"
- "!**/node_modules/**"
- "!**/.next/**"
- "!**/dist/**"
- "!**/.turbo/**"
- "!**/coverage/**"
- "!**/*.snap"
path_instructions:
- path: "**/*.{ts,tsx}"
instructions: |
## TypeScript / React ์ปจ๋ฒค์
(docs/conventions/code-style.md ๊ธฐ์ค)
### ํ์
์์ ์ฑ
- `any` ํ์
์ฌ์ฉ ์ ๋ ๊ธ์ง โ `unknown` ์ฌ์ฉ ํ ํ์
narrowing ํ์
- Props ํ์
์ `interface`๋ก ์ ์ธํ๊ณ ์ ๋ฏธ์ฌ `Props` ์ฌ์ฉ (์: `ButtonProps`)
- `type` alias๋ ์ ๋์ธยทํํยท๋ฆฌํฐ๋ด์๋ง ์ฌ์ฉ, ์ ๋ฏธ์ฌ `Types`
### ์ปดํฌ๋ํธ ํจํด
- ์ปดํฌ๋ํธ๋ ๋ฐ๋์ Arrow function + Named export: `export const Component = () => {}`
- `default export`๋ `page.tsx`, `layout.tsx` ๋ฑ Next.js ํ์ ํ์ผ์๋ง ํ์ฉ
- ์์ ์์ผ๋ฉด self-closing: `<Component />`
- ๋ถํ์ํ div ๋ํ ๊ธ์ง โ ์ปดํฌ๋ํธ ์์ฒด๊ฐ ์๊ฐ์ ์ปจํ
์ด๋(๋ฐฐ๊ฒฝ์ยทํฌ๊ธฐยทborder-radius ๋ฑ ์คํ์ผ์ ์ ์)์ธ ๊ฒฝ์ฐ๋ div ํ์ฉ, ๊ทธ ์ธ ๋จ์ ๊ทธ๋ฃนํ ๋ชฉ์ ์ด๋ฉด Fragment `<>โฆ</>` ์ฌ์ฉ
### Import
- ์ ๋ ๊ฒฝ๋ก import ์ฌ์ฉ (์๋ ๊ฒฝ๋ก `../../` ์ง์)
### ๋ณ์ยทํจ์ ๋ค์ด๋ฐ
- Boolean ๋ณ์๋ช
: `is`, `has`, `should`, `can` ์ ๋์ฌ
- ๋ณต์ ๋ฐ์ดํฐ: ๋์ `s` (์: `userLists`)
- `handle` ์ ๋์ฌ๋ ์ด๋ฒคํธ ํธ๋ค๋ฌ์๋ง ์ฌ์ฉ
- ํจ์ ์ ๋์ฌ: `get`(๋ฐํ) / `create`(์์ฑ) / `check`(ํ์ธ) / `convert`(๋ณํ) / `filter`(ํํฐ๋ง)
- ์ค์๋ง ์ง์, ์๋ฏธ ์๋ ๋ช
์นญ ์ฌ์ฉ
### React ๋ฆฌ์คํธ ๋ ๋๋ง
- ๋์ ๋ฆฌ์คํธ์ `key` prop: ๋ฐ๋์ ๊ณ ์ `id` ์ฌ์ฉ (index ๊ธ์ง)
- ์ ์ ๋ฆฌ์คํธ: index ํ์ฉ
### ์ ๊ทผ์ฑ (A11y)
- `div` ๋จ๋ฐ ๊ธ์ง โ `main`, `article`, `section`, `nav`, `header`, `footer` ๋ฑ ์๋งจํฑ ํ๊ทธ ์ฌ์ฉ
- ํค๋ฉ ๋ ๋ฒจ ์ ํ ๊ธ์ง, ํ์ด์ง๋น `<h1>` ํ๋
- ํ
์คํธ ์๋ ๋ฒํผ์ `aria-label` ํ์
- `outline: none`์ผ๋ก ํฌ์ปค์ค ํ
๋๋ฆฌ ์ ๊ฑฐ ๊ธ์ง
- `<input>`์ `id` ๋ถ์ฌ ํ `<label htmlFor>` ์ฐ๊ฒฐ
- path: "apps/timo-web/app/**"
instructions: |
## Next.js App Router ๊ณ์ธต ๊ท์น (docs/architecture/components.md ๊ธฐ์ค)
- `page.tsx`: ๋ผ์ฐํ
ยท๋ ์ด์์ ์กฐํฉ๋ง ๋ด๋น (Server Component), ๋น์ฆ๋์ค ๋ก์ง ํฌํจ ๊ธ์ง
- `_components/`: props๋ง ๋ฐ๋ ์์ UI โ `'use client'` ์์ด ๋์ ๊ฐ๋ฅํด์ผ ํจ
- `_containers/`: `'use client'` ํ์, useQueryยทzustand ๋ฑ ์ธ๋ถ ์ํ์ ๊ฒฐํฉํ๋ ํด๋ผ์ด์ธํธ ์ปจํ
์ด๋
- `_queries/`: ํด๋น ๋๋ฉ์ธ ์ ์ฉ React Query hooks (useQuery ยท useMutation ยท queryKey ์ ์)
- ๋๋ฉ์ธ ๊ฐ ์ง์ import ๊ธ์ง โ ๊ณต์ ๋ก์ง์ ๋ฐ๋์ `lib/` ๋๋ `packages/`๋ก ์ถ์ถ
- ์๋ฒ ์ํ(API ๋ฐ์ดํฐ)๋ฅผ Zustand์ ์ ์ฅ ๊ธ์ง โ React Query๊ฐ ๋จ์ผ ์ถ์ฒ
- path: "apps/timo-web/stores/**"
instructions: |
## Zustand ์คํ ์ด ๊ท์น
- API ์๋ฒ ๋ฐ์ดํฐ๋ฅผ store์ ์ ์ฅ ๊ธ์ง (React Query๊ฐ ๋ด๋น)
- ํ์ ๊ฐ์ store์ ์ ์ฅํ์ง ์๊ณ selector๋ก ๊ณ์ฐ
- URL๋ก ๊ณต์ ๊ฐ๋ฅํ ์ํ(ํํฐ, ํญ)๋ searchParams ์ฐ์ ๊ณ ๋ ค
- path: "packages/timo-design-system/**"
instructions: |
## ๋์์ธ ์์คํ
ํจํค์ง ๊ท์น
- `apps/*` ์ฐธ์กฐ ์ ๋ ๊ธ์ง (๋จ๋ฐฉํฅ ์์กด์ฑ)
- ๋ฒ์ฉ UI ์ปดํฌ๋ํธ๋ง ํฌํจ (Button, Card ๋ฑ)
- ๋๋ฉ์ธ ํนํ ๋ก์งยท๋น์ฆ๋์ค ๋ก์ง ํฌํจ ๊ธ์ง
- path: ".github/workflows/**"
instructions: |
## GitHub Actions ์ํฌํ๋ก์ฐ ๋ฆฌ๋ทฐ
- ์ํฌ๋ฆฟ ํ๋์ฝ๋ฉ ์ฌ๋ถ ํ์ธ
- ์ํฌํ๋ก์ฐ ํธ๋ฆฌ๊ฑฐ ์กฐ๊ฑด ์ ์ ์ฑ ํ์ธ
- ๋ถํ์ํ ๊ถํ ๋ถ์ฌ ์ฌ๋ถ ํ์ธ (principle of least privilege)
- ์ธ๋ถ ์ก์
๋ฒ์ ํ๋(SHA ๋๋ ํ๊ทธ) ์ฌ๋ถ ํ์ธ
finishing_touches:
docstrings:
enabled: false
chat:
auto_reply: true