@projectplaceholders/typescript-config
v0.1.0
Published
Strict TypeScript presets for AI-assisted codebases.
Readme
@projectplaceholders/typescript-config
Strict TypeScript presets for AI-assisted codebases.
A loose compiler lets an agent's plausible-looking code through. A strict one turns the compiler into the reviewer that reads every diff before you do — which is the whole point.
Presets
| Preset | Extends | For |
|---|---|---|
| base.json | — | Shared strictness. NodeNext module resolution. |
| next.json | base | Next.js apps. ESNext + Bundler, jsx: preserve, noEmit. |
| node.json | base | CLIs, services, tooling. No DOM lib, @types/node. |
| react-library.json | base | React component libraries consumed through a bundler. ESNext + Bundler, jsx: react-jsx. |
// tsconfig.json
{
"extends": "@projectplaceholders/typescript-config/next.json"
}What every preset guarantees
| Flag | Catches |
|---|---|
| strict | Implicit any, unsound this, unchecked nulls |
| noUncheckedIndexedAccess | arr[0] treated as always present |
| exactOptionalPropertyTypes | { a: undefined } passed where a?: string is declared |
| noImplicitOverride | A subclass silently shadowing a base method |
| noFallthroughCasesInSwitch | A case that runs into the next one |
| verbatimModuleSyntax | Type-only imports that survive into runtime code |
| erasableSyntaxOnly | enum, namespace, parameter properties — syntax that needs a real transform |
These are enforced, not documented: test/strict-flags.test.mjs typechecks a fixture with
one deliberate violation per flag and asserts every preset still reports it. Weaken a flag
and the test names it.
pnpm test