typescript-config

typescript-config is a cursor rule for Cursor from louisbrulenaudet/monorepo-template. It costs 0 tokens per session (1,284 once invoked), scanned A, original, Apache-2.0.

A guide to shared TypeScript compiler presets for libraries, React browser apps, and Node.js tools. It explains which strict checks change how code must be written and how each app should inherit the correct preset.

In plain words
What is it for?
Use it when configuring a package, choosing browser or server types, enabling path imports, or interpreting TypeScript compiler errors.
Why use it?
It prevents packages from drifting into different compiler settings and helps developers understand errors caused by strict type checking or the selected runtime.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when configuring a package, choosing browser or server types, enabling path imports, or interpreting TypeScript compiler errors.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/louisbrulenaudet/monorepo-template/typescript-config
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/louisbrulenaudet/monorepo-template

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for typescript-config

README.md
[![agentmods](https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/typescript-config/github.svg)](https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/typescript-config)
Your own site
<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/typescript-config"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/typescript-config/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for typescript-config

Your own site · 80×15
<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/typescript-config"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/typescript-config.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,284 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01284
Opus 5.5 $0.00000 $0.00514
Sonnet 5.5 $0.00000 $0.00257
Haiku 4.5 $0.00000 $0.00128

Measured 28d ago against content hash 9cb0d10f87d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

typescript-config scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 28d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/quality/typescript-config.mdc · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TypeScript Config Presets

Shared presets live in @repo/typescript-config. Apps and libraries extend a runtime preset and never fork compiler options. The preset JSON is the source of truth for which options are set; this rule covers what the JSON cannot say. Changing a shared preset is a monorepo-wide breaking change.

Preset For Runtime shape
strict.json never extended directly shared strict core; the flags that change how code is written are in code-style.mdc
library.json cross-runtime JIT libraries (extends strict) lib: es2023, no DOM or Worker globals; noEmit + incremental tsBuildInfoFile
workers.json Worker apps thin role alias of library.json
vite-react.json React SPAs (extends strict) lib includes DOM, types: ["vite/client"]; noEmit
vite-node.json Vite build-time config only (extends strict) types: ["node"], no DOM; noEmit
tests.json mixin appended after a runtime preset no lib / target; tests tsbuildinfo path, tests/ + src/ include, exclude

Deliberate omissions

  • No preset-level types for Workers. Each Worker app sets "types": [] and includes cloudflare.config.ts and .cloudflare/types: the generated file carries Env and the workerd runtime types, and the empty list stops TypeScript auto-loading every visible @types/* - @types/node, installed for vite.config.ts, would put Node globals on Worker code. Runtime types come from cf workers types, never the shared preset; add @cloudflare/workers-types only for a shared library with no cloudflare.config.ts. allowImportingTsExtensions lives in library.json, vite-node.json, and vite-react.json (all noEmit): cloudflare.config.ts imports its entrypoint as ./src/index.ts, and @repo/enums-common imports its own modules with .ts extensions so Node can load it natively from cloudflare.config.ts.
  • isolatedDeclarations is off: @repo/dtos-common uses schema-first inference (z.infer<typeof Schema>), and the flag would demand a hand-written duplicate type on every exported schema (contracts.mdc).

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 28d ago Changed · -49 lines 9cb0d10f87d4
  2. 1mo ago Changed 66d47e5db690
  3. 1mo ago First seen · 112 lines · 0 tokens per session scan A 82bef0e5c419

Subscribe to this mod's changes

typescript-config is a cursor rule published in the GitHub repository louisbrulenaudet/monorepo-template (19 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,284 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.