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
React GitHub Copilot Instructions
GitHub CopilotReact
GitHub Copilot instructions for React: hooks, patterns, and best practices for modern React apps.
Code Style
react · copilotCopy Ready
Next.js GitHub Copilot Instructions
GitHub CopilotNext.js
GitHub Copilot custom instructions for Next.js App Router projects.
Architecture
nextjs · copilotCopy Ready
Java GitHub Copilot Instructions
GitHub CopilotJava
GitHub Copilot instructions for Java 21: virtual threads, records, sealed types, and modern Spring Boot patterns.
Code Style
java · springCopy Ready
Swift GitHub Copilot Instructions
GitHub CopilotSwift
GitHub Copilot instructions for Swift: SwiftUI, async/await, and modern iOS development patterns.
Code Style
swift · swiftuiCopy Ready