Cursor rule
.cursor/rules/typescript.mdcMiddle Earth TypeScript baseline guidelines (compiler, modules, best practices)
Cursor rules
Quality
59/100
Scores the file, not the repository.Length
162 words
6 headings · 0 code blocksRepository
0
— · pushed 4 days agoLast changed
3 days ago
First indexed 3 days ago.123456789# TypeScript (Middle Earth)1011## Compiler and language1213- Respect `tsconfig.base.json`: `strict` true, `verbatimModuleSyntax`, `noUnusedLocals/Parameters`.14- Use the provided path aliases (`@middle-earth/libs/publishable/*`); do not import via relative `../../..`.15- No `any` or unsafe casts; favor precise types and narrowing.1617## Modules and barrels1819- Import from library barrels (`src/index.ts`). Avoid deep imports into internal files.20- Keep public types exported from the barrel.2122## Functions and variables2324- Prefer explicit function return types for exported functions and public APIs.25- Meaningful identifiers; no 1-2 letter names; avoid abbreviations unless industry-standard.26- Use early returns and narrow unions with type guards.27- Organize constants, helpers, and types by file: `*.constants.ts`, `*.helpers.ts`, `*.types.ts`.2829## Error handling3031- Use `Result`-like patterns or typed errors. Do not swallow errors; add context.32- Prefer `type-fest` utility types where possible.3334## Lint integration3536- Follow root ESLint config (Airbnb base/typescript, SonarJS, Unicorn, Security, Promise, Perfectionist, Prettier).37- Avoid default exports unless required by a framework (e.g., Next.js pages/layouts).38
Also in carrot-foundation/middle-earth
Diff this repo’s formatsOne 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?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| carrot-foundation/middle-earth.cursor/rules/bmad.mdc · 0 | Cursor rules | gitdo-not | 51/100 | 3 days ago | |
| carrot-foundation/middle-earth.cursor/rules/branch-naming.mdc · 0 | Cursor rules | lint-formatstylegitdo-not | 45/100 | 3 days ago | |
| carrot-foundation/middle-earth.cursor/rules/code-comments.mdc · 0 | Cursor rules | styletypesdocs | 48/100 | 3 days ago | |
| carrot-foundation/middle-earth.cursor/rules/code-preservation.mdc · 0 | Cursor rules | do-not | 32/100 | 3 days ago | |
| carrot-foundation/middle-earth.cursor/rules/code-style.mdc · 0 | Cursor rules | lint-formatstylearchdependencies+1 | 56/100 | 3 days ago | |
| carrot-foundation/middle-earth.cursor/rules/commit.mdc · 0 | Cursor rules | testlint-formattypesgit | 58/100 | 3 days ago | |
| carrot-foundation/middle-earth.cursor/rules/documentation.mdc · 0 | Cursor rules | lint-formatstylearchdocs | 42/100 | 3 days ago | |
| carrot-foundation/middle-earth.cursor/rules/pull-request-description.mdc · 0 | Cursor rules | git | 39/100 | 3 days ago | |
| carrot-foundation/middle-earth.cursor/rules/pull-request.mdc · 0 | Cursor rules | lint-formatgitagent-behaviour | 69/100 | 3 days ago | |
| carrot-foundation/middle-earth.cursor/rules/testing.mdc · 0 | Cursor rules | teststyletesting-strategy | 73/100 | 3 days ago | |
| carrot-foundation/middle-earthAGENTS.md · 0 | AGENTS.md | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| carrot-foundation/middle-earthCLAUDE.md · 0 | CLAUDE.md | setupbuildtestlint-format+6 | 97/100 | 3 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/code-style.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 AGENTS.md Diff against CLAUDE.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
