Cursor rule
.cursor/rules/ts.mdc[object Object]
Cursor rules
Quality
55/100
Scores the file, not the repository.Length
214 words
5 headings · 0 code blocksRepository
0
— · pushed 262 days agoLast changed
3 days ago
First indexed 3 days ago.123456# TypeScript Best Practices78## Type Safety & Configuration910- Enable `strict: true` in [tsconfig.json](mdc:tsconfig.json) with additional flags:11 - `noImplicitAny: true`12 - `strictNullChecks: true`13 - `strictFunctionTypes: true`14 - `strictBindCallApply: true`15 - `strictPropertyInitialization: true`16 - `noImplicitThis: true`17 - `alwaysStrict: true`18 - `exactOptionalPropertyTypes: true`19- Never use `// @ts-ignore` or `// @ts-expect-error` without explanatory comments20- Use `--noEmitOnError` compiler flag to prevent generating JS files when TypeScript errors exist2122## Type Definitions2324- Do not ever use `any`. Ever. If you feel like you have to use `any`, use `unknown` instead.25- Explicitly type function parameters, return types, and object literals.26- Please don't ever use Enums. Use a union if you feel tempted to use an Enum.27- Use `readonly` modifiers for immutable properties and arrays28- Leverage TypeScript's utility types (`Partial`, `Required`, `Pick`, `Omit`, `Record`, etc.)29- Use discriminated unions with exhaustiveness checking for type narrowing3031## Advanced Patterns3233- Implement proper generics with appropriate constraints34- Use mapped types and conditional types to reduce type duplication35- Leverage `const` assertions for literal types36- Implement branded/nominal types for type-level validation37## Code Organization3839- Organize types in dedicated files (types.ts) or alongside implementations40- Document complex types with JSDoc comments41- Create a central `types.ts` file or a `src/types` directory for shared types42
Also in sferg989/fergfo.om
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 |
|---|---|---|---|---|---|
| sferg989/fergfo.om.cursor/rules/astro-component-structure.mdc · 0 | Cursor rules | stylearchui | 58/100 | 3 days ago | |
| sferg989/fergfo.om.cursor/rules/astro-database-integration.mdc · 0 | Cursor rules | database | 50/100 | 3 days ago | |
| sferg989/fergfo.om.cursor/rules/astro-error-handling.mdc · 0 | Cursor rules | styledatabaseui | 58/100 | 3 days ago | |
| sferg989/fergfo.om.cursor/rules/astro-performance-patterns.mdc · 0 | Cursor rules | buildstyledatabaseperformance | 62/100 | 3 days ago | |
| sferg989/fergfo.om.cursor/rules/astro-ssr-patterns.mdc · 0 | Cursor rules | style | 49/100 | 3 days ago | |
| sferg989/fergfo.om.cursor/rules/ts-typecheck.mdc · 0 | Cursor rules | do-not | 23/100 | 3 days ago | |
| sferg989/fergfo.om.cursorrules · 0 | .cursorrules | do-not | 49/100 | 3 days ago | |
| sferg989/fergfo.omCLAUDE.md · 0 | CLAUDE.md | setupbuildteststyle+7 | 89/100 | 3 days ago |
Diff against .cursor/rules/astro-component-structure.mdc Diff against .cursor/rules/astro-database-integration.mdc Diff against .cursor/rules/astro-error-handling.mdc Diff against .cursor/rules/astro-performance-patterns.mdc Diff against .cursor/rules/astro-ssr-patterns.mdc Diff against .cursor/rules/ts-typecheck.mdc Diff against .cursorrules Diff against CLAUDE.md
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 |
