Skip to content

Commit 2714251

Browse files
authored
Add custom instructions (#7047)
1 parent a9d2f40 commit 2714251

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/copilot-instructions.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## General Guidelines
2+
- **Follow the existing code style**: Use single quotes, semicolons, and 2-space indentation. See `.eslintrc.base.json` for detailed linting rules.
3+
- **TypeScript**: Use modern TypeScript features. Prefer explicit types where clarity is needed, but do not over-annotate.
4+
- **React/JSX**: Webviews use React-style JSX with custom factories (`vscpp`, `vscppf`).
5+
- **Strictness**: Some strictness is disabled in `tsconfig.base.json` (e.g., `strictNullChecks: false`), but new code should avoid unsafe patterns.
6+
- **Testing**: Place tests under `src/test`. Do not include test code in production files.
7+
- **Localization**: Use `%key%` syntax for strings that require localization. See `package.nls.json`.
8+
9+
## Extension-Specific Practices
10+
- **VS Code API**: Use the official VS Code API for all extension points. Register commands, views, and menus via `package.json`.
11+
- **Configuration**: All user-facing settings must be declared in `package.json` under `contributes.configuration`.
12+
- **Activation Events**: Only add new activation events if absolutely necessary.
13+
- **Webviews**: Place webview code in the `webviews/` directory. Use the shared `common/` code where possible.
14+
- **Commands**: Register new commands in `package.json` and implement them in `src/commands.ts` or a relevant module.
15+
16+
---
17+
_Last updated: 2025-06-20_

0 commit comments

Comments
 (0)