angular-best-practices-v20
Angular Best Practices (v20+)
Comprehensive performance optimization guide for Angular 20+ applications with modern features like Signals, httpResource, signal inputs/outputs, @defer blocks, and native control flow syntax. Contains 35+ rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Writing new Angular 20+ components
- Using Signals for reactive state (signal, computed, linkedSignal, effect)
- Using httpResource/resource for data fetching
- Using signal inputs/outputs instead of decorators
- Implementing @defer for lazy loading
- Using native control flow (@if, @for, @switch)
- Implementing SSR with incremental hydration
- Reviewing code for performance issues
Key Features (v20+)
More from develite98/angular-best-practices
angular-css-bem-best-practices
Angular + BEM CSS methodology guide for creating reusable components and shareable front-end code. Enforces component-scoped BEM blocks, max 2-level nesting, proper component decomposition, semantic element naming, correct modifier patterns, and flat selectors. Use when writing, reviewing, or refactoring Angular component styles. Triggers on tasks involving CSS, SCSS, SASS, component styling, BEM naming, or CSS architecture.
50angular-best-practices-legacy
Angular 12-16 performance optimization guidelines with NgModules, RxJS patterns, and classic template syntax (*ngIf, *ngFor). Use when maintaining or working with pre-v17 Angular codebases. Triggers on tasks involving Angular components, services, modules, or performance improvements in legacy projects.
34the-art-of-naming
Comprehensive naming convention guide for TypeScript and Angular applications. Covers casing rules (camelCase, PascalCase, UPPER_CASE), prefix conventions (I for interfaces, _ for private, T for generics), boolean naming, the S-I-D principle (Short, Intuitive, Descriptive), context duplication, and structured naming patterns (P/HC/LC for variables, A/HC/LC for functions). Use when writing, reviewing, or refactoring TypeScript code. Triggers on tasks involving naming, variables, functions, interfaces, or code style.
33