Repository navigation
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
92 lines (78 loc) · 3.33 KB
/
Copy path.coderabbit.yaml
File metadata and controls
92 lines (78 loc) · 3.33 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
language: "en-US"
# Customize tone so CodeRabbit reviews with clear guidelines for FastStore
tone_instructions: >
Review FastStore PRs focusing on performance, SEO, accessibility, TypeScript safety, and code readability (clear structure, flat conditionals, meaningful names). Be concise and actionable.
early_access: false
enable_free_tier: true
reviews:
auto_review:
enabled: true
base_branches:
- "dev"
- ".*"
# Review tone (chill vs assertive)
profile: "chill"
# Provide a high level summary of PR changes
high_level_summary: true
# Optional: include extra review behaviours
request_changes_workflow: false
high_level_summary_in_walkthrough: false
auto_title_placeholder: "@coderabbitai"
# Helpful flags
review_status: true
commit_status: false
collapse_walkthrough: false
changed_files_summary: true
# Path filters to exclude things like output, generated files, and build folders
path_filters:
- "packages/**"
- "!**/dist/**"
- "!**/.next/**"
- "!**/node_modules/**"
- "!**/@generated/**"
- "!**/storybook-static/**"
- "src/**"
- "apps/**"
- "!dist/**"
- "!.next/**"
- "!node_modules/**"
# Optional path specific instructions (useful for FastStore code patterns)
path_instructions:
- path: "packages/**/src/components/**"
instructions: |
Component code:
- Ensure React hooks follow rules of hooks (no conditional hooks, proper dependencies)
- Check rendering performance (avoid heavy operations on render, use memo/useMemo/useCallback when appropriate)
- Favor lazy loading for large components using dynamic imports
- Use semantic HTML and proper ARIA labels for accessibility
- Ensure components are properly typed with TypeScript
- path: "packages/core/src/pages/**"
instructions: |
Page-level code (Model in MVC - data fetching):
- Ensure correct use of Next.js conventions (getStaticProps, getServerSideProps, File System Routing)
- Validate SEO-related tags (meta tags, structured data, Open Graph)
- Performance implications: static generation vs SSR vs ISR
- Proper error handling (404, 500 pages)
- Static data fetching should happen here, dynamic enrichment in components
- path: "packages/**/src/sdk/**"
instructions: |
SDK code:
- Custom hooks should follow React hooks conventions
- GraphQL queries should be optimized (avoid over-fetching, use fragments)
- Business logic should be separated from UI concerns
- path: "packages/api/src/**"
instructions: |
GraphQL API code:
- TypeDefs should follow GraphQL best practices
- Resolvers should be platform-agnostic when possible
- Proper error handling and validation
- Consider performance implications of resolvers
- Type safety with generated types
- path: "packages/**/*.{ts,tsx}"
instructions: |
TypeScript files:
- Ensure type safety and avoid type assertions when possible
- Consider bundle size impact of dependencies
- Prefer flat conditionals over nested ifs: combine conditions with && or use early returns to avoid deep nesting and improve readability.
chat:
auto_reply: true