-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
50 lines (43 loc) · 1.72 KB
/
.coderabbit.yaml
File metadata and controls
50 lines (43 loc) · 1.72 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
# .coderabbit.yaml for Open Source Bazaar 项目
# -----------------
# 核心设置
# -----------------
# 设置 CodeRabbit 回复的语言 (e.g., "en", "zh-CN")
language: "zh-CN"
# -----------------
# 审查配置
# -----------------
reviews:
# 高级摘要配置
high_level_summary: true
high_level_summary_placeholder: "这是 Open Source Bazaar 项目的 PR 变更摘要"
# 路径过滤 - 排除 Next.js 项目中不需要审查的文件和目录
path_filters:
- "src/**"
- "pages/**"
- "components/**"
- "models/**"
- "!**/*.md"
- "!**/*.{bin,csv}"
- "!node_modules/**"
- "!.next/**"
- "!public/**/*.{png,jpg,jpeg,gif,webp,svg,ico,mp4,mp3,woff,woff2,ttf,otf}"
- "!out/**"
- "!next-env.d.ts"
- "!package-lock.json"
- "!pnpm-lock.yaml"
- "!yarn.lock"
- "!**/__snapshots__/**"
# 代码生成指令
code_generation:
docstrings:
path_instructions:
"pages/**": "确保所有用户界面文本使用 t() 函数进行国际化翻译"
"components/**": "必须使用 React Bootstrap 组件替代自定义 HTML 元素"
"models/**": "检查 MobX store 的正确使用,包括 @observer、@observable、@action、@computed"
# 全局语气指令
tone_instructions: |
使用专业中文语气。重点关注:1) 统一用 React Bootstrap;2) MobX
observer/observable/action/computed 是否正确;3) 全部 UI 文本用 t();4) GitHub
API 认证/错误处理与 Base64 统一用 web-utility;5) Pages Router 的数据获取正确;
6) TypeScript 强类型;7) 性能(next/image、避免多余渲染);8) 结构清晰。