Shared TypeScript config for my projects. Two variants: a strict Node.js / Bun library preset (default) and a DOM / browser preset for bundler-based apps.
npm install --save-dev @ozzyczech/tsconfigyarn add --dev @ozzyczech/tsconfigpnpm add -D @ozzyczech/tsconfigbun add -d @ozzyczech/tsconfigStrict Node ESM: module and moduleResolution set to nodenext, lib: ["ES2024"], no DOM, no JSX.
{
"extends": "@ozzyczech/tsconfig",
"include": ["src/**/*"]
}Extends the base and adds DOM + DOM.Iterable libs, jsx: "react-jsx", and moduleResolution: "bundler" for Vite / esbuild / Next / Bun.
{
"extends": "@ozzyczech/tsconfig/dom",
"include": ["src/**/*"]
}Both variants share these strict compiler options:
strict,noImplicitReturns,noImplicitOverridenoUnusedLocals,noUnusedParametersnoFallthroughCasesInSwitch,noUncheckedIndexedAccess,noUncheckedSideEffectImportserasableSyntaxOnly— disallowsenum, parameter properties,namespace; keeps code compatible with type-stripping runtimes (Node 22+, Bun,tsx)isolatedModules— every file must be transpilable in isolation (required by esbuild, swc, Babel)declaration,stripInternal— emits clean.d.tssuitable for librariesresolveJsonModule,esModuleInterop,allowSyntheticDefaultImportsskipLibCheck,incremental
The output directory defaults to ${configDir}/dist and is excluded from compilation.
Push a semver tag — the publish.yml workflow builds, publishes to npm with provenance, and creates a GitHub Release from commit messages.
git tag v2.0.0 && git push origin v2.0.0