RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/magdazelena/primer

Cursor rule

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

Quality

65/100

Scores the file, not the repository.

Length

175 words

6 headings · 2 code blocks

Repository

3

— · pushed 158 days ago

Last changed

3 days ago

First indexed 3 days ago.
magdazelena/primer/.cursor/rules/typescript-conventions.mdcRawGitHub
1---
2globs: *.ts,*.tsx
3---
4 
5# TypeScript Conventions
6 
7## Import Organization
8 
9Follow strict import ordering as defined in ESLint config:
10 
111. **React imports** (first)
122. **External libraries** (alphabetical)
133. **Internal modules** (alphabetical)
144. **Type imports** (separate group)
15 
16```typescript
17import React from 'react';
18import { NextPage } from 'next';
19 
20import { Button } from '@/components/common';
21import { apiClient } from '@/lib/api';
22 
23import type { Product } from '@/types/product';
24import type { ApiResponse } from '@/types/api';
25```
26 
27## Type Definitions
28 
29- Use `type` imports for type-only imports
30- Define interfaces for component props
31- Use strict TypeScript configuration
32- Avoid `any` type - use `unknown` or proper typing
33 
34## Function Components
35 
36Use arrow function syntax for React components:
37 
38```typescript
39const MyComponent = ({ prop1, prop2 }: ComponentProps) => {
40 return <div>{prop1}</div>;
41};
42```
43 
44## File Naming
45 
46- **Components**: PascalCase (`Button.tsx`)
47- **Utilities**: camelCase (`api-helpers.ts`)
48- **Types**: camelCase (`product.ts`)
49- **Constants**: UPPER_SNAKE_CASE (`API_ENDPOINTS.ts`)
50 
51## ESLint Rules
52 
53- `@typescript-eslint/consistent-type-imports`: Always use type imports
54- `@typescript-eslint/consistent-type-exports`: Always use type exports
55- `@typescript-eslint/no-unused-vars`: Warn on unused vars (ignore `_` prefix)
56- `@typescript-eslint/no-explicit-any`: Warn on `any` usage

Sections

  • TypeScript Conventions
  • Import Organization
  • Type Definitions
  • Function Components
  • File Naming
  • ESLint Rules

What it covers

lint-formatcode-styletypesdo-not

Stack — with the evidence

node

(1.00)

nextjs

(1.00)

turborepo

(1.00)

react

(0.70)

tailwind

(0.70)

jest

(0.70)

cypress

(0.70)

eslint

(0.70)

typescript

(0.60)

javascript

(0.60)

monorepo

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

All configs in this repo

Also in magdazelena/primer

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
magdazelena/primer.cursor/rules/agents.mdc · 3Cursor rulesnodenextjs+10no sections48/1003 days ago
magdazelena/primer.cursor/rules/code-quality.mdc · 3Cursor rulesnodenextjs+10lint-formatstyletypesperformance+273/1003 days ago
magdazelena/primer.cursor/rules/memory.mdc · 3Cursor rulesnodenextjs+10styleperformancedo-notagent-behaviour61/1003 days ago
magdazelena/primer.cursor/rules/monorepo-management.mdc · 3Cursor rulesnodenextjs+10buildtestlint-formatstyle+579/1003 days ago
magdazelena/primer.cursor/rules/nextjs-frontend.mdc · 3Cursor rulesnodenextjs+10teststylearchapi+172/1003 days ago
magdazelena/primer.cursor/rules/project-structure.mdc · 3Cursor rulesnodenextjs+10testlint-formatarchmonorepo71/1003 days ago
magdazelena/primer.cursor/rules/strapi-backend.mdc · 3Cursor rulesnodenextjs+10stylearchtypesdatabase68/1003 days ago
magdazelena/primer.cursor/rules/strapi-plugin-development.mdc · 3Cursor rulesnodenextjs+10buildtestarchagent-behaviour85/1003 days ago
magdazelena/primer.cursor/rules/testing-conventions.mdc · 3Cursor rulesnodenextjs+10teststyletesting-strategyapi+173/1003 days ago
Diff against .cursor/rules/agents.mdc Diff against .cursor/rules/code-quality.mdc Diff against .cursor/rules/memory.mdc Diff against .cursor/rules/monorepo-management.mdc Diff against .cursor/rules/nextjs-frontend.mdc Diff against .cursor/rules/project-structure.mdc Diff against .cursor/rules/strapi-backend.mdc Diff against .cursor/rules/strapi-plugin-development.mdc Diff against .cursor/rules/testing-conventions.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-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