

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456---7description: TypeScript coding standards and best practices for modern web development8globs: **/*.ts, **/*.tsx, **/*.d.ts9---1011# TypeScript Best Practices1213## Type System14- Prefer interfaces over types for object definitions15- Use type for unions, intersections, and mapped types16- Avoid using `any`, prefer `unknown` for unknown types17- Use strict TypeScript configuration18- Leverage TypeScript's built-in utility types19- Use generics for reusable type patterns2021## Naming Conventions22- Use PascalCase for type names and interfaces23- Use camelCase for variables and functions24- Use UPPER_CASE for constants25- Use descriptive names with auxiliary verbs (e.g., isLoading, hasError)26- Prefix interfaces for React props with 'Props' (e.g., ButtonProps)2728## Code Organization29- Keep type definitions close to where they're used30- Export types and interfaces from dedicated type files when shared31- Use barrel exports (index.ts) for organizing exports32- Place shared types in a `types` directory33- Co-locate component props with their components3435## Functions36- Use explicit return types for public functions37- Use arrow functions for callbacks and methods38- Implement proper error handling with custom error types39- Use function overloads for complex type scenarios40- Prefer async/await over Promises4142## Best Practices43- Enable strict mode in tsconfig.json44- Use readonly for immutable properties45- Leverage discriminated unions for type safety46- Use type guards for runtime type checking47- Implement proper null checking48- Avoid type assertions unless necessary4950## Error Handling51- Create custom error types for domain-specific errors52- Use Result types for operations that can fail53- Implement proper error boundaries54- Use try-catch blocks with typed catch clauses55- Handle Promise rejections properly5657## Patterns58- Use the Builder pattern for complex object creation59- Implement the Repository pattern for data access60- Use the Factory pattern for object creation61- Leverage dependency injection62- Use the Module pattern for encapsulation6364## Module Imports65- **Always use namespace imports (`import * as name from '...'`).** This style ensures that the origin of any imported symbol is always explicit (e.g., `types.Comment` instead of just `Comment`), which improves code clarity and prevents naming conflicts. This aligns with standard practices in Go.66- **Existing code using named imports (`import { ... } from '...'`) must be refactored to use namespace imports upon discovery.**67
One 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 |
|---|---|---|---|---|---|
| glidea/zenfeed-web.cursor/rules/basic.mdc · 19 | Cursor rules | archdo-notagent-behaviourdocs | 59/100 | 14 days ago |
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 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 46 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/glidea-zenfeed-web-cursor-rules-ts)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.