GitHub CopilotTypeScriptCode Style

TypeScript GitHub Copilot Instructions

GitHub Copilot custom instructions for TypeScript: strict types, modern patterns, and team conventions.

.github/copilot-instructions.md
- Generate TypeScript with strict compiler settings; no implicit any
- Use zod for all runtime validation; infer TypeScript types from schemas
- Prefer const over let; never use var
- Use type guards and assertion functions for runtime type narrowing
- Generate barrel files (index.ts) for clean public APIs of modules
- Use absolute imports with TypeScript path mapping; avoid relative ../../../ imports
- Apply ESLint with @typescript-eslint/strict ruleset
- Use vitest for unit tests; it's faster than jest for TypeScript projects

How to use with GitHub Copilot

Create `.github/copilot-instructions.md` in your repository. GitHub Copilot uses these to customize suggestions across your whole repo.

#typescript#copilot#github#strict#coding-rules

Related Rules