RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/carrot-foundation/middle-earth

Cursor rule

.cursor/rules/code-style.mdc

Middle Earth code style conventions (TypeScript/JavaScript)

Cursor rules

Quality

56/100

Scores the file, not the repository.

Length

190 words

8 headings · 0 code blocks

Repository

0

— · pushed 4 days ago

Last changed

3 days ago

First indexed 3 days ago.
carrot-foundation/middle-earth/.cursor/rules/code-style.mdcRawGitHub
1---
2description: 'Middle Earth code style conventions (TypeScript/JavaScript)'
3globs:
4 - '*'
5alwaysApply: true
6---
7 
8# Code style (Middle Earth)
9 
10## Naming and clarity
11 
12- Use descriptive names; avoid abbreviations unless industry-standard (URL, ID, API).
13- Functions are verbs; variables are nouns.
14- Prefer explicit return types for exported functions and public APIs.
15 
16## Structure and files
17 
18- Cohesion-first: one responsibility per module.
19- Organize by file type when it helps:
20 - `*.constants.ts`: constants and enums
21 - `*.types.ts`: types and interfaces
22 - `*.helpers.ts`: pure functions/utilities
23- Use barrels (`src/index.ts`) for library exports; no deep imports.
24 
25## Control flow
26 
27- Favor guard clauses and early returns; keep nesting shallow (≤ 2 levels).
28- Avoid deeply nested ternaries; extract small functions.
29 
30## Dependencies and imports
31 
32- Prefer path aliases defined in `tsconfig.base.json` (`@middle-earth/libs/publishable/*`).
33- Respect Nx module boundaries and tags.
34 
35## Error handling and validation
36 
37- Validate inputs at boundaries.
38- Enrich errors with context; avoid silent failures.
39 
40## Performance and DX
41 
42- Prefer pure functions and immutable data structures where possible.
43- Avoid premature optimization; measure first. Keep components and modules small and composable.
44 
45## Formatting and tooling
46 
47- End files with a single trailing newline.
48- After editing files, run formatter and linter with `--fix`.
49 

Sections

  • Code style (Middle Earth)
  • Naming and clarity
  • Structure and files
  • Control flow
  • Dependencies and imports
  • Error handling and validation
  • Performance and DX
  • Formatting and tooling

What it covers

lint-formatcode-stylearchitecturedependenciesperformance

Stack — with the evidence

typescript

(1.00)

node

(1.00)

nx

(1.00)

jest

(1.00)

eslint

(1.00)

react

(0.70)

nextjs

(0.70)

vitest

(0.70)

aws

(0.70)

javascript

(0.60)

monorepo

(0.60)

pnpm

(0.60)

terraform

(0.60)

github-actions

(0.60)

Glob targeting

  • *

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

All configs in this repo

Also in carrot-foundation/middle-earth

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
carrot-foundation/middle-earth.cursor/rules/bmad.mdc · 0Cursor rulestypescriptnode+12gitdo-not51/1003 days ago
carrot-foundation/middle-earth.cursor/rules/branch-naming.mdc · 0Cursor rulestypescriptnode+12lint-formatstylegitdo-not45/1003 days ago
carrot-foundation/middle-earth.cursor/rules/code-comments.mdc · 0Cursor rulestypescriptnode+12styletypesdocs48/1003 days ago
carrot-foundation/middle-earth.cursor/rules/code-preservation.mdc · 0Cursor rulestypescriptnode+12do-not32/1003 days ago
carrot-foundation/middle-earth.cursor/rules/commit.mdc · 0Cursor rulestypescriptnode+12testlint-formattypesgit58/1003 days ago
carrot-foundation/middle-earth.cursor/rules/documentation.mdc · 0Cursor rulestypescriptnode+12lint-formatstylearchdocs42/1003 days ago
carrot-foundation/middle-earth.cursor/rules/pull-request-description.mdc · 0Cursor rulestypescriptnode+12git39/1003 days ago
carrot-foundation/middle-earth.cursor/rules/pull-request.mdc · 0Cursor rulestypescriptnode+12lint-formatgitagent-behaviour69/1003 days ago
carrot-foundation/middle-earth.cursor/rules/testing.mdc · 0Cursor rulestypescriptnode+12teststyletesting-strategy73/1003 days ago
carrot-foundation/middle-earth.cursor/rules/typescript.mdc · 0Cursor rulestypescriptnode+12buildlint-formatstylearch+159/1003 days ago
carrot-foundation/middle-earthAGENTS.md · 0AGENTS.mdtypescriptnode+12setupbuildtestlint-format+797/1003 days ago
carrot-foundation/middle-earthCLAUDE.md · 0CLAUDE.mdtypescriptnode+12setupbuildtestlint-format+697/1003 days ago
Diff against .cursor/rules/bmad.mdc Diff against .cursor/rules/branch-naming.mdc Diff against .cursor/rules/code-comments.mdc Diff against .cursor/rules/code-preservation.mdc Diff against .cursor/rules/commit.mdc Diff against .cursor/rules/documentation.mdc Diff against .cursor/rules/pull-request-description.mdc Diff against .cursor/rules/pull-request.mdc Diff against .cursor/rules/testing.mdc Diff against .cursor/rules/typescript.mdc Diff against AGENTS.md Diff against CLAUDE.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