← ClaudeAtlas

tsconfig-strict-esmlisted

How this repo's TypeScript project is configured — strict/ESM options in tsconfig.base.json, the build-vs-tooling split — and how to change it safely. Use when editing tsconfig*.json, adding a project reference, or debugging TS5110/TS2834/2835 errors, even phrased as "add a package", "the build can't find my import", or "why do I need .js in imports". Not for generic TypeScript questions.
monte3l/m3l-automation · ★ 0 · Data & Documents · score 56
Install: claude install-skill monte3l/m3l-automation
# TypeScript strict ESM config (m3l-automation) The shared options live in [`tsconfig.base.json`](../../../tsconfig.base.json); every other tsconfig extends it. The repo is **ESM-only, Node 24+, `strict: true`**, compiled with `tsc` (no bundler), so the config choices are load-bearing — changing one can break emit, resolution, or the `.d.ts` output that consumers rely on. ## When to use Editing any `tsconfig*.json`, adding a package/project reference, or diagnosing a compiler error about modules, extensions, or strictness. ## The project layout (why there are several tsconfigs) - **`tsconfig.base.json`** — all the real compiler options; the single place to change a flag repo-wide. Sets `composite: true` and `declaration: true`. - **`tsconfig.json` (root)** — a _solution_ file: `"files": []` plus `references` to the buildable projects. It builds nothing itself; it wires `tsc --build`. - **`packages/m3l-common/tsconfig.build.json`** — the **emit** project: extends base, sets `rootDir: src`, `outDir: dist`, `tsBuildInfoFile`, and _excludes tests_. This is what produces shippable `dist/` (`.js` + `.d.ts`). - **`packages/m3l-common/tsconfig.json`** — the **tooling** project (editor, ESLint typed linting, test type-checking): extends base but turns `composite`/`declaration`/`declarationMap` **off** and sets `noEmit: true`, and _includes tests_. It type-checks the world without emitting. The build-vs-tooling split exists because emit wants a narrow, composite, de