RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/KAMAL20201/SneakerMarketplace

Cursor rule

.cursor/rules/typescript-standards.mdc
Cursor rules

Quality

61/100

Scores the file, not the repository.

Length

286 words

8 headings · 1 code blocks

Repository

0

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
KAMAL20201/SneakerMarketplace/.cursor/rules/typescript-standards.mdcRawGitHub
1# TypeScript Standards
2 
3## Strict TypeScript Requirements
4 
5- Always use strict TypeScript mode
6- Never use `any` type - use proper type definitions
7- Use `unknown` instead of `any` when type is truly unknown
8- Always define proper interfaces and types for props, state, and API responses
9 
10## Type Definitions
11 
12- Define types in `src/types/` directory
13- Use descriptive type names (e.g., `ProductListing`, `UserProfile`)
14- Export types from dedicated type files
15- Use union types for finite sets of values
16- Prefer `interface` for object shapes, `type` for unions/intersections
17 
18## Component Props
19 
20- Always define `Props` interface for component props
21- Use `React.FC<Props>` or `React.ComponentProps<"div">` for component typing
22- Make props required unless they have default values
23- Use proper event types (e.g., `React.ChangeEvent<HTMLInputElement>`)
24 
25## Enum Usage
26 
27- Always use enums from `src/constants/enums.ts` for consistent values
28- Never hardcode string values that exist in enums
29- Use enum values for API calls, form validation, and conditional logic
30- Export enum types for use in other files
31 
32## Context Typing
33 
34- Define proper types for context values and setters
35- Use `createContext<T>` with proper generic types
36- Define context provider props interface
37- Use proper typing for context consumers
38 
39## API and Service Types
40 
41- Define types for all API request/response shapes
42- Use proper typing for Supabase operations
43- Define error types and handle them appropriately
44- Use generic types for reusable service functions
45 
46## Example Patterns
47 
48```typescript
49// Good: Proper interface definition
50interface ProductCardProps {
51 product: Product;
52 onAddToCart: (productId: string) => void;
53 variant?: "default" | "compact";
54}
55 
56// Good: Using enums
57const status = LISTING_STATUS.APPROVED;
58 
59// Good: Proper event typing
60const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
61 setValue(e.target.value);
62};
63```
64 
65description:
66globs:
67alwaysApply: false
68 
69---
70 

Sections

  • TypeScript Standards
  • Strict TypeScript Requirements
  • Type Definitions
  • Component Props
  • Enum Usage
  • Context Typing
  • API and Service Types
  • Example Patterns

What it covers

code-styletypesapiuido-not

Stack — with the evidence

typescript

(1.00)

supabase

(1.00)

vite

(1.00)

eslint

(1.00)

vercel

(1.00)

react

(0.70)

tailwind

(0.70)

aws

(0.70)

javascript

(0.60)

github-actions

(0.60)

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

All configs in this repo

Also in KAMAL20201/SneakerMarketplace

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
KAMAL20201/SneakerMarketplace.cursor/rules/api-patterns.mdc · 0Cursor rulestypescriptsupabase+8styletypessecuritydatabase+158/1003 days ago
KAMAL20201/SneakerMarketplace.cursor/rules/development-workflow.mdc · 0Cursor rulestypescriptsupabase+8buildteststyletypes+481/1003 days ago
KAMAL20201/SneakerMarketplace.cursor/rules/project-conventions.mdc · 0Cursor rulestypescriptsupabase+8buildteststylearch+477/1003 days ago
KAMAL20201/SneakerMarketplace.cursor/rules/project-overview.mdc · 0Cursor rulestypescriptsupabase+8stylearchtypes52/1003 days ago
KAMAL20201/SneakerMarketplace.cursor/rules/react-patterns.mdc · 0Cursor rulestypescriptsupabase+8stylearchuiperformance58/1003 days ago
KAMAL20201/SneakerMarketplace.cursor/rules/ui-components.mdc · 0Cursor rulestypescriptsupabase+8archui54/1003 days ago
KAMAL20201/SneakerMarketplaceAGENTS.md · 0AGENTS.mdtypescriptsupabase+8stylesecuritydo-not45/1003 days ago
Diff against .cursor/rules/api-patterns.mdc Diff against .cursor/rules/development-workflow.mdc Diff against .cursor/rules/project-conventions.mdc Diff against .cursor/rules/project-overview.mdc Diff against .cursor/rules/react-patterns.mdc Diff against .cursor/rules/ui-components.mdc Diff against AGENTS.md

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