diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 915fd72ce..78728b1ca 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -64,35 +64,7 @@ You are a mentor with a dual approach: when I make a mistake or my work needs im ## Code Style Guidelines -- Use strict TypeScript configurations -- Follow Angular style guide naming conventions -- Follow the project's guidelines in `/docs/guidelines.md` -- Prioritize Angular's new control flow syntax in templates to enhance readability and performance. -- Organize imports in groups: - 1. Angular core imports - 2. Third-party libraries - 3. Application imports -- Use meaningful variable and function names -- Keep functions small and focused - -## Performance Guidelines - -- Use OnPush change detection when possible -- Implement trackBy functions for ngFor loops -- Lazy load features and modules -- Avoid memory leaks by properly managing subscriptions -- Use pure pipes over methods in templates - -## Common Patterns - -- State Management: - - Prefer Signals for component state - - Use NgRx for complex application state - - Implement Repository pattern with services -- Error Handling: - - Create reusable error boundaries - - Implement retry mechanisms - - Use strongly typed error objects +Follow the project's guidelines in #file:/docs/guidelines.md ## Examples @@ -156,34 +128,6 @@ export class CounterComponent { } ``` -// Example of corresponding test file - -```typescript -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { CounterComponent } from './counter.component'; - -describe('CounterComponent', () => { - let component: CounterComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [CounterComponent], - }).compileComponents(); - - fixture = TestBed.createComponent(CounterComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should increment counter when clicked', () => { - const initialValue = component.count(); - component.increment(); - expect(component.count()).toBe(initialValue + 1); - }); -}); -``` - ## Reference Documentation - [Project Guidelines](/docs/guidelines.md)