Copilot instructions
.github/instructions/typescript.instructions.mdCopilot instructions
Quality
62/100
Scores the file, not the repository.Length
325 words
15 headings · 7 code blocksRepository
19
— · pushed 151 days agoLast changed
3 days ago
First indexed 3 days ago.12345# TypeScript/JavaScript Coding Style67> This file extends [common/coding-style.md](../common/coding-style.md) with TypeScript/JavaScript specific content.89## Immutability1011Use spread operator for immutable updates:1213```typescript14// WRONG: Mutation15function updateUser(user, name) {16 user.name = name // MUTATION!17 return user18}1920// CORRECT: Immutability21function updateUser(user, name) {22 return {23 ...user,24 name25 }26}27```2829## Error Handling3031Use async/await with try-catch:3233```typescript34try {35 const result = await riskyOperation()36 return result37} catch (error) {38 console.error('Operation failed:', error)39 throw new Error('Detailed user-friendly message')40}41```4243## Input Validation4445Use Zod for schema-based validation:4647```typescript48import { z } from 'zod'4950const schema = z.object({51 email: z.string().email(),52 age: z.number().int().min(0).max(150)53})5455const validated = schema.parse(input)56```5758## Console.log5960- No `console.log` statements in production code61- Use proper logging libraries instead62- See hooks for automatic detection636465# TypeScript/JavaScript Patterns6667> This file extends [common/patterns.md](../common/patterns.md) with TypeScript/JavaScript specific content.6869## API Response Format7071```typescript72interface ApiResponse<T> {73 success: boolean74 data?: T75 error?: string76 meta?: {77 total: number78 page: number79 limit: number80 }81}82```8384## Custom Hooks Pattern8586```typescript87export function useDebounce<T>(value: T, delay: number): T {88 const [debouncedValue, setDebouncedValue] = useState<T>(value)8990 useEffect(() => {91 const handler = setTimeout(() => setDebouncedValue(value), delay)92 return () => clearTimeout(handler)93 }, [value, delay])9495 return debouncedValue96}97```9899## Repository Pattern100101```typescript102interface Repository<T> {103 findAll(filters?: Filters): Promise<T[]>104 findById(id: string): Promise<T | null>105 create(data: CreateDto): Promise<T>106 update(id: string, data: UpdateDto): Promise<T>107 delete(id: string): Promise<void>108}109```110111112# TypeScript/JavaScript Security113114> This file extends [common/security.md](../common/security.md) with TypeScript/JavaScript specific content.115116## Secret Management117118```typescript119// NEVER: Hardcoded secrets120const apiKey = "sk-proj-xxxxx"121122// ALWAYS: Environment variables123const apiKey = process.env.OPENAI_API_KEY124125if (!apiKey) {126 throw new Error('OPENAI_API_KEY not configured')127}128```129130## Agent Support131132- Use **security-reviewer** skill for comprehensive security audits133134135# TypeScript/JavaScript Testing136137> This file extends [common/testing.md](../common/testing.md) with TypeScript/JavaScript specific content.138139## E2E Testing140141Use **Playwright** as the E2E testing framework for critical user flows.142143## Agent Support144145- **e2e-runner** - Playwright E2E testing specialist
Also in j7-dev/everything-github-copilot
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| j7-dev/everything-github-copilot.codex/AGENTS.md · 19 | AGENTS.md | securityagent-behaviour | 59/100 | 3 days ago | |
| j7-dev/everything-github-copilot.github/instructions/python.instructions.md · 19 | Copilot instructions | testlint-formatstyletypes+2 | 85/100 | 3 days ago | |
| j7-dev/everything-github-copilot.github/instructions/swift.instructions.md · 19 | Copilot instructions | testlint-formatstyletypes+2 | 81/100 | 3 days ago | |
| j7-dev/everything-github-copilotAGENTS.md · 19 | AGENTS.md | buildteststylearch+4 | 77/100 | 3 days ago | |
| j7-dev/everything-github-copilot.github/copilot-instructions.md · 19 | Copilot instructions | buildtestlint-formatstyle+6 | 76/100 | 3 days ago | |
| j7-dev/everything-github-copilot.github/instructions/go.instructions.md · 19 | Copilot instructions | testlint-formatstyletesting-strategy+1 | 77/100 | 3 days ago | |
| j7-dev/everything-github-copilotCLAUDE.md · 19 | CLAUDE.md | testarchagent-behaviour | 81/100 | 3 days ago | |
| j7-dev/everything-github-copilotskills/react-best-practices/AGENTS.md · 19 | AGENTS.md | buildlint-formatstylearch+8 | 64/100 | 3 days ago |
Diff against .codex/AGENTS.md Diff against .github/instructions/python.instructions.md Diff against .github/instructions/swift.instructions.md Diff against AGENTS.md Diff against .github/copilot-instructions.md Diff against .github/instructions/go.instructions.md Diff against CLAUDE.md Diff against skills/react-best-practices/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 3 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 3 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 24 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 3 days ago | |
| nerolis-lab/nerolis-lab.github/copilot-instructions.md · 32 | Copilot instructions | setupbuildtestlint-format+11 | 96/100 | 3 days ago | |
| thangaram611/second-brain.github/copilot-instructions.md · 0 | Copilot instructions | setupteststylearch+4 | 96/100 | 3 days ago |
