-
-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
96 lines (84 loc) · 3.13 KB
/
.coderabbit.yaml
File metadata and controls
96 lines (84 loc) · 3.13 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
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: 'en-US'
tone_instructions: 'Enforce Angular best practices: signals (input/output/computed), OnPush, inject(), native control flow, class/style bindings, strict TypeScript, CVA patterns, TailwindCSS v4. Flag @HostBinding/@HostListener.'
reviews:
profile: 'assertive'
high_level_summary: true
auto_review:
enabled: true
drafts: false
ignore_title_keywords:
- 'wip'
- 'draft'
path_filters:
- '!node_modules/**'
- '!dist/**'
- '!.angular/**'
- '!packages/**'
- '!apps/web/public/**'
- 'apps/**'
- 'libs/**'
- 'scripts/**'
path_instructions:
- path: 'libs/zard/src/lib/components/**/*.component.ts'
instructions: |
- NO standalone: true (it's default, must be omitted)
- MUST use ChangeDetectionStrategy.OnPush
- Proper @/* library imports
- Use input() and output() functions, NOT @Input/@Output decorators
- Use computed() for derived state
- Host bindings in host object, NOT @HostBinding/@HostListener
- Use inject() function, NOT constructor injection
- Verify mergeClasses() for CVA variant integration
- Avoid 'any' type, use strict typing
- path: 'libs/zard/src/lib/components/**/*.html'
instructions: |
- Use native control flow: @if, @for, @switch (NOT *ngIf/*ngFor/*ngSwitch)
- Use [class] bindings, NOT ngClass
- Use [style] bindings, NOT ngStyle
- Keep templates simple, avoid complex logic
- Use async pipe for observables
- Use NgOptimizedImage for static images
- path: 'libs/zard/src/lib/components/**/*.variants.ts'
instructions: |
- Verify CVA patterns with strict TypeScript types
- Ensure TailwindCSS v4 utility classes
- Use type inference when obvious
- path: 'libs/zard/src/lib/components/**/*.spec.ts'
instructions: |
- Jest + @happy-dom setup
- Test standalone components properly
- Comprehensive coverage for signals and computed values
- path: 'libs/zard/src/lib/shared/**/*.service.ts'
instructions: |
- Use providedIn: 'root' for singletons
- Single responsibility principle
- Use inject() function, NOT constructor injection
- Keep state transformations pure
- Proper @/* library imports
- path: 'libs/zard/src/lib/components/**/demo/**'
instructions: 'Validate demo structure follows patterns with clear examples'
- path: 'libs/zard/src/lib/components/**/doc/**'
instructions: 'Ensure complete API documentation in overview.md and api.md'
- path: 'apps/web/**'
instructions: |
- Lazy loading for feature routes
- Proper @zard/* library consumption
- Follow same Angular best practices
tools:
eslint:
enabled: true
gitleaks:
enabled: true
actionlint:
enabled: true
chat:
auto_reply: true
knowledge_base:
code_guidelines:
enabled: true
filePatterns:
- '**/.cursorrules'
- '**/CLAUDE.md'
- '**/CONTRIBUTING.md'
- '**/README.md'