Cursor rule
.cursor/rules/code-style.mdcTypeScript code style standards
Cursor rules
Quality
65/100
Scores the file, not the repository.Length
199 words
5 headings · 2 code blocksRepository
40
— · pushed 120 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# Code Style89## Clarity Above All1011- Variable, function, and class names must be self-explanatory12- Avoid obscure abbreviations. Prefer `calculateTotalGain` over `calcTG`13- Small functions with a single responsibility (< 30 lines ideally)14- No unnecessary comments. The code should explain itself1516```typescript17// ❌ Bad: comment that repeats the code18// Calculate the total gain19const totalGain = this.calculateTotalGain(positions);2021// ✅ Good: self-explanatory name, no comment needed22const totalGain = this.calculateTotalGain(positions);23```2425## When to Comment2627Comment only:28- Non-obvious business decisions (e.g., a specific tax rule)29- Temporary workarounds with a link to the issue30- Public interfaces (concise JSDoc)3132## Strict TypeScript3334- `strict: true` is active. Never use `any` (ESLint rule enforced)35- Use discriminated unions instead of boolean flags36- Prefer `readonly` for immutable properties37- Use `interface` for contracts, `type` for unions and utility types3839```typescript40// ❌ Bad41function process(data: any): any { ... }4243// ✅ Good44function processOperations(operations: readonly Operation[]): PortfolioSnapshot { ... }45```4647## Conventions4849- Imports use the `@/` alias for `src/`50- One main class/type per file51- Files named after the class/type they export52- Private methods prefixed with clear purpose, not underscore53
Also in miguelslemos/stock_portfolio
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 |
|---|---|---|---|---|---|
| miguelslemos/stock_portfolio.cursor/rules/architecture.mdc · 40 | Cursor rules | styledependencies | 48/100 | 3 days ago | |
| miguelslemos/stock_portfolio.cursor/rules/domain-logic.mdc · 40 | Cursor rules | do-not | 57/100 | 3 days ago | |
| miguelslemos/stock_portfolio.cursor/rules/new-features.mdc · 40 | Cursor rules | styledo-not | 61/100 | 3 days ago | |
| miguelslemos/stock_portfolio.cursor/rules/project-overview.mdc · 40 | Cursor rules | testlint-formatarchdo-not | 72/100 | 3 days ago | |
| miguelslemos/stock_portfolio.cursor/rules/testing.mdc · 40 | Cursor rules | setupteststylearch+1 | 62/100 | 3 days ago | |
| miguelslemos/stock_portfolio.cursor/rules/ui-presentation.mdc · 40 | Cursor rules | ui | 50/100 | 3 days ago |
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 |
