Cursor rule
.cursor/rules/typescript.mdc[object Object]
Cursor rules
Quality
55/100
Scores the file, not the repository.Length
250 words
7 headings · 0 code blocksRepository
0
— · pushed 396 days agoLast changed
3 days ago
First indexed 3 days ago.123456# TypeScript Best Practices78## Type System9- Prefer interfaces over types for object definitions10- Use type for unions, intersections, and mapped types11- NEVER use `any` or `as any` types or coercion12- Use strict TypeScript configuration13- Leverage TypeScript's built-in utility types14- Use generics for reusable type patterns1516## Naming Conventions17- Use PascalCase for type names and interfaces18- Use camelCase for variables and functions19- Use UPPER_CASE for constants20- Use descriptive names with auxiliary verbs (e.g., isLoading, hasError)21- Prefix interfaces for React props with 'Props' (e.g., ButtonProps)2223## Code Organization24- Keep type definitions close to where they're used25- Export types and interfaces from dedicated type files when shared26- Use barrel exports (index.ts) for organizing exports27- Place shared types in a `types.ts` file28- Co-locate component props with their components2930## Functions31- Use explicit return types for public functions32- Use arrow functions for callbacks and methods33- Implement proper error handling with custom error types34- Use function overloads for complex type scenarios35- Prefer async/await over Promises36- Prefer function declarations over function expressions.37- Prefer functional programming over classes.3839## Best Practices40- Enable strict mode in tsconfig.json41- Use readonly for immutable properties42- Leverage discriminated unions for type safety43- Use type guards for runtime type checking44- Implement proper null checking45- Avoid type assertions unless necessary4647## Error Handling48- Do not proactively add error handling49- Handle Promise rejections properly50
Also in poglesbyg/htsf-consultant
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 |
|---|---|---|---|---|---|
| poglesbyg/htsf-consultant.cursor/rules/always.mdc · 0 | Cursor rules | test | 35/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursor/rules/code-conventions.mdc · 0 | Cursor rules | setuplint-formatstyledo-not+1 | 80/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursor/rules/crispr-algorithms.mdc · 0 | Cursor rules | deployment | 44/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursor/rules/data-models.mdc · 0 | Cursor rules | typessecuritydatabase | 44/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursor/rules/database.mdc · 0 | Cursor rules | typesdatabasedo-not | 61/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursor/rules/env-vars.mdc · 0 | Cursor rules | securitydo-not | 63/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursor/rules/react.mdc · 0 | Cursor rules | style | 34/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursor/rules/shadcn-components.mdc · 0 | Cursor rules | ui | 63/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursor/rules/smart-polling.mdc · 0 | Cursor rules | no sections | 44/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursor/rules/trpc-architecture.mdc · 0 | Cursor rules | archtypes | 56/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursor/rules/trpc.mdc · 0 | Cursor rules | no sections | 40/100 | 3 days ago | |
| poglesbyg/htsf-consultant.cursorrules · 0 | .cursorrules | archdeploymentagent-behaviour | 48/100 | 3 days ago |
Diff against .cursor/rules/always.mdc Diff against .cursor/rules/code-conventions.mdc Diff against .cursor/rules/crispr-algorithms.mdc Diff against .cursor/rules/data-models.mdc Diff against .cursor/rules/database.mdc Diff against .cursor/rules/env-vars.mdc Diff against .cursor/rules/react.mdc Diff against .cursor/rules/shadcn-components.mdc Diff against .cursor/rules/smart-polling.mdc Diff against .cursor/rules/trpc-architecture.mdc Diff against .cursor/rules/trpc.mdc Diff against .cursorrules
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
