Skip to content

Commit 055711f

Browse files
committed
feat: add coding style guidelines and testing guidelines to copilot instructions
Signed-off-by: Vladislav Polyakov <[email protected]>
1 parent b8316e3 commit 055711f

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/copilot-instructions.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Coding Style Guidelines
2+
3+
## Variable Declarations
4+
5+
- Always use `let` instead of `const` for variable declarations, even if the variable is not reassigned
6+
- This applies to all JavaScript and TypeScript code
7+
8+
## Code Formatting
9+
10+
- Use tabs for indentation (tabWidth: 4)
11+
- Use single quotes for strings
12+
- No semicolons at the end of statements (semi: false)
13+
- Maximum line length: 120 characters
14+
- Use trailing comma in ES5 style
15+
- Include spaces inside curly braces (bracketSpacing: true)
16+
17+
## TypeScript Preferences
18+
19+
- Use `#` prefix for private fields
20+
- Prefer explicit types when possible
21+
22+
## JSON Preferences
23+
24+
- Use double quotes for keys and string values
25+
- No trailing commas
26+
- Always include whitespace after colons
27+
28+
# Testing Guidelines
29+
30+
- Write tests for all new features and bug fixes
31+
- Use a vitest testing framework
32+
- Aim for high test coverage, but prioritize critical paths
33+
- Include both unit tests and integration tests
34+
- Use concise and clear test names that reflect the behavior being tested

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
},
1111
"vitest.rootConfig": "./vitest.config.ts",
1212
"vitest.workspaceConfig": "./vitest.config.ts",
13+
"github.copilot.chat.codeGeneration.useInstructionFiles": true
1314
}

0 commit comments

Comments
 (0)