RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/miguelslemos/stock_portfolio

Cursor rule

.cursor/rules/code-style.mdc

TypeScript code style standards

Cursor rules

Quality

65/100

Scores the file, not the repository.

Length

199 words

5 headings · 2 code blocks

Repository

40

— · pushed 120 days ago

Last changed

3 days ago

First indexed 3 days ago.
miguelslemos/stock_portfolio/.cursor/rules/code-style.mdcRawGitHub
1---
2description: TypeScript code style standards
3globs: web/src/**/*.ts
4alwaysApply: false
5---
6 
7# Code Style
8 
9## Clarity Above All
10 
11- Variable, function, and class names must be self-explanatory
12- 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 itself
15 
16```typescript
17// ❌ Bad: comment that repeats the code
18// Calculate the total gain
19const totalGain = this.calculateTotalGain(positions);
20 
21// ✅ Good: self-explanatory name, no comment needed
22const totalGain = this.calculateTotalGain(positions);
23```
24 
25## When to Comment
26 
27Comment only:
28- Non-obvious business decisions (e.g., a specific tax rule)
29- Temporary workarounds with a link to the issue
30- Public interfaces (concise JSDoc)
31 
32## Strict TypeScript
33 
34- `strict: true` is active. Never use `any` (ESLint rule enforced)
35- Use discriminated unions instead of boolean flags
36- Prefer `readonly` for immutable properties
37- Use `interface` for contracts, `type` for unions and utility types
38 
39```typescript
40// ❌ Bad
41function process(data: any): any { ... }
42 
43// ✅ Good
44function processOperations(operations: readonly Operation[]): PortfolioSnapshot { ... }
45```
46 
47## Conventions
48 
49- Imports use the `@/` alias for `src/`
50- One main class/type per file
51- Files named after the class/type they export
52- Private methods prefixed with clear purpose, not underscore
53 

Sections

  • Code Style
  • Clarity Above All
  • When to Comment
  • Strict TypeScript
  • Conventions

What it covers

lint-formatcode-styletypesdo-notdocs

Stack — with the evidence

typescript

(1.00)

vite

(1.00)

vitest

(1.00)

eslint

(1.00)

node

(0.70)

react

(0.70)

tailwind

(0.70)

javascript

(0.60)

github-actions

(0.60)

Glob targeting

  • web/src/**/*.ts

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
miguelslemos
Language
—
License
—
Archived
no

All configs in this repo

Also in miguelslemos/stock_portfolio

Diff this repo’s formats

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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
miguelslemos/stock_portfolio.cursor/rules/architecture.mdc · 40Cursor rulestypescriptvite+7styledependencies48/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/domain-logic.mdc · 40Cursor rulestypescriptvite+7do-not57/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/new-features.mdc · 40Cursor rulestypescriptvite+7styledo-not61/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/project-overview.mdc · 40Cursor rulestypescriptvite+7testlint-formatarchdo-not72/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/testing.mdc · 40Cursor rulestypescriptvite+7setupteststylearch+162/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/ui-presentation.mdc · 40Cursor rulestypescriptvite+7ui50/1003 days ago
Diff against .cursor/rules/architecture.mdc Diff against .cursor/rules/domain-logic.mdc Diff against .cursor/rules/new-features.mdc Diff against .cursor/rules/project-overview.mdc Diff against .cursor/rules/testing.mdc Diff against .cursor/rules/ui-presentation.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack