RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/poglesbyg/htsf-consultant

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 blocks

Repository

0

— · pushed 396 days ago

Last changed

3 days ago

First indexed 3 days ago.
poglesbyg/htsf-consultant/.cursor/rules/typescript.mdcRawGitHub
1---
2description:
3globs: **/*.ts,**/*.tsx
4alwaysApply: false
5---
6# TypeScript Best Practices
7 
8## Type System
9- Prefer interfaces over types for object definitions
10- Use type for unions, intersections, and mapped types
11- NEVER use `any` or `as any` types or coercion
12- Use strict TypeScript configuration
13- Leverage TypeScript's built-in utility types
14- Use generics for reusable type patterns
15 
16## Naming Conventions
17- Use PascalCase for type names and interfaces
18- Use camelCase for variables and functions
19- Use UPPER_CASE for constants
20- Use descriptive names with auxiliary verbs (e.g., isLoading, hasError)
21- Prefix interfaces for React props with 'Props' (e.g., ButtonProps)
22 
23## Code Organization
24- Keep type definitions close to where they're used
25- Export types and interfaces from dedicated type files when shared
26- Use barrel exports (index.ts) for organizing exports
27- Place shared types in a `types.ts` file
28- Co-locate component props with their components
29 
30## Functions
31- Use explicit return types for public functions
32- Use arrow functions for callbacks and methods
33- Implement proper error handling with custom error types
34- Use function overloads for complex type scenarios
35- Prefer async/await over Promises
36- Prefer function declarations over function expressions.
37- Prefer functional programming over classes.
38 
39## Best Practices
40- Enable strict mode in tsconfig.json
41- Use readonly for immutable properties
42- Leverage discriminated unions for type safety
43- Use type guards for runtime type checking
44- Implement proper null checking
45- Avoid type assertions unless necessary
46 
47## Error Handling
48- Do not proactively add error handling
49- Handle Promise rejections properly
50 

Sections

  • TypeScript Best Practices
  • Type System
  • Naming Conventions
  • Code Organization
  • Functions
  • Best Practices
  • Error Handling

What it covers

code-styletypesdo-not

Stack — with the evidence

typescript

(1.00)

tailwind

(1.00)

turborepo

(1.00)

eslint

(1.00)

node

(0.70)

react

(0.70)

astro

(0.70)

postgres

(0.70)

vitest

(0.70)

javascript

(0.60)

monorepo

(0.60)

pnpm

(0.60)

docker

(0.60)

github-actions

(0.60)

Glob targeting

  • **/*.ts
  • **/*.tsx

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
poglesbyg
Language
—
License
—
Archived
no

All configs in this repo

Also in poglesbyg/htsf-consultant

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
poglesbyg/htsf-consultant.cursor/rules/always.mdc · 0Cursor rulestypescripttailwind+12test35/1003 days ago
poglesbyg/htsf-consultant.cursor/rules/code-conventions.mdc · 0Cursor rulestypescripttailwind+12setuplint-formatstyledo-not+180/1003 days ago
poglesbyg/htsf-consultant.cursor/rules/crispr-algorithms.mdc · 0Cursor rulestypescripttailwind+12deployment44/1003 days ago
poglesbyg/htsf-consultant.cursor/rules/data-models.mdc · 0Cursor rulestypescripttailwind+12typessecuritydatabase44/1003 days ago
poglesbyg/htsf-consultant.cursor/rules/database.mdc · 0Cursor rulestypescripttailwind+12typesdatabasedo-not61/1003 days ago
poglesbyg/htsf-consultant.cursor/rules/env-vars.mdc · 0Cursor rulestypescripttailwind+12securitydo-not63/1003 days ago
poglesbyg/htsf-consultant.cursor/rules/react.mdc · 0Cursor rulestypescripttailwind+12style34/1003 days ago
poglesbyg/htsf-consultant.cursor/rules/shadcn-components.mdc · 0Cursor rulestypescripttailwind+12ui63/1003 days ago
poglesbyg/htsf-consultant.cursor/rules/smart-polling.mdc · 0Cursor rulestypescripttailwind+12no sections44/1003 days ago
poglesbyg/htsf-consultant.cursor/rules/trpc-architecture.mdc · 0Cursor rulestypescripttailwind+12archtypes56/1003 days ago
poglesbyg/htsf-consultant.cursor/rules/trpc.mdc · 0Cursor rulestypescripttailwind+12no sections40/1003 days ago
poglesbyg/htsf-consultant.cursorrules · 0.cursorrulestypescripttailwind+12archdeploymentagent-behaviour48/1003 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.

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