-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
51 lines (45 loc) · 2.15 KB
/
.coderabbit.yaml
File metadata and controls
51 lines (45 loc) · 2.15 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
language: "ko-KR"
reviews:
profile: "chill"
auto_review:
enabled: true
drafts: false
base_branches: ["develop"]
path_filters:
- "!**/.next/**"
- "!**/node_modules/**"
- "!**/dist/**"
- "!**/build/**"
- "!**/coverage/**"
- "!**/.turbo/**"
- "!**/.cache/**"
- "!**/.vercel/**"
- "!**/out/**"
- "!**/*.log"
- "!**/*.lock"
- "!**/pnpm-lock.yaml"
- "!**/next-env.d.ts"
- "!**/.DS_Store"
path_instructions:
- path: "**/*"
instructions: |
- 리뷰는 한국어로 작성.
- 유지보수/확장성 관점에서 모듈 경계(의존성 방향, 책임 분리)가 적절한지 최우선으로 확인.
- 파일/함수 책임이 과도하면 응집도/결합도 기준으로 분리/통합 개선안을 제시.
- TypeScript에서 any/과도한 as 캐스팅을 지양하고, 도메인 타입(예: ProfileId 같은 ID 타입)으로 의미를 드러내는지 확인.
- React에서 상태 위치 미스, 불필요한 리렌더링, derived state 남발, useEffect 남용을 지적하고 개선안을 제시.
- path: "src/app/**/*.ts*"
instructions: |
- Next.js App Router 규칙 준수: server/client 컴포넌트 경계가 적절한지 확인.
- 가능하면 데이터 패칭은 async 서버 컴포넌트/route handler에서 처리하고, 클라에서 불필요한 fetch/useEffect를 줄일 것.
- "use client"는 꼭 필요한 곳에만.
- path: "**/api/**/*.ts*"
instructions: |
- API 모듈은 DTO 타입 + 네트워크 호출 + toDomain 매핑까지 책임지는 구조를 우선 권장.
- UI에서 raw DTO(res.json())를 직접 다루지 않도록, 반환 타입은 Domain(User 등)으로 정규화.
- fetch 옵션(credentials, headers 등) 규약이 일관적인지 확인.
- path: "**/ui/**/*.tsx"
instructions: |
- 상태 위치가 적절한지(상/하위 이동 필요성) 지적하고 개선안 제시.
- 파생 값은 state로 두지 말고 계산(useMemo는 필요할 때만).
- 리스트 key 안정성, 불필요한 re-render 유발 props(익명 함수/객체) 지적.