|
1 | 1 | # GitHub Copilot Instructions |
2 | 2 |
|
3 | 3 | ## Development Philosophy |
| 4 | + |
4 | 5 | - **Quality over quantity**: Write clean, maintainable, and well-structured code |
5 | 6 | - **Senior-level TypeScript**: Leverage advanced TypeScript features for type safety |
6 | 7 | - **Minimal and focused**: Every line of code should serve a clear purpose |
7 | 8 | - **Performance-conscious**: Consider efficiency and avoid unnecessary complexity |
8 | 9 |
|
9 | 10 | ## TypeScript & ESLint Rules |
| 11 | + |
10 | 12 | - **No console.log**: Use proper logging or remove debug statements |
11 | 13 | - **Consistent type imports**: Use `import type` for type-only imports |
12 | 14 | - **No unused vars**: Prefix with `_` if intentionally unused |
|
21 | 23 | - **Prefer directory imports**: Use `../src` instead of `../src/index` for cleaner imports |
22 | 24 |
|
23 | 25 | ## Prettier Configuration |
| 26 | + |
24 | 27 | - **Print width**: 100 characters max |
25 | 28 | - **No semicolons**: Use semicolon-free style |
26 | 29 | - **Import order**: Follow the specified import grouping: |
|
31 | 34 | 5. Relative imports (~/,../, ./) |
32 | 35 |
|
33 | 36 | ## Code Generation Guidelines |
| 37 | + |
34 | 38 | - Remove all `console.log` statements from generated code |
35 | 39 | - Use proper TypeScript types instead of `any` when possible |
36 | 40 | - **Use type-fest when available** - Prefer battle-tested utility types from type-fest over custom implementations |
|
46 | 50 | - Optimize for readability and maintainability |
47 | 51 |
|
48 | 52 | ## File Structure |
| 53 | + |
49 | 54 | - Keep imports organized according to prettier rules |
50 | 55 | - Use meaningful variable and function names |
51 | 56 | - Add proper JSDoc comments for public APIs |
52 | 57 | - Prefer composition over inheritance |
53 | | -- Use readonly arrays and objects where appropriate |
| 58 | +- Use readonly arrays and objects where appropriate |
0 commit comments