@aggreggator-labs/config-typescript
v0.0.1
Published
Shared TypeScript compiler options for aggreggator-labs repositories - extend tsconfig.base.json from a repo-local tsconfig.json
Maintainers
Readme
@aggreggator-labs/config-typescript
The shared TypeScript compiler options for aggreggator-labs
repositories. tsconfig.base.json is the source of truth; a
repository extends it from its own tsconfig.json and adds only
what describes its tree.
Usage
bun add -d @aggreggator-labs/config-typescript typescriptRoot tsconfig.json:
{
"extends": "@aggreggator-labs/config-typescript/tsconfig.base.json",
"compilerOptions": { "types": ["node", "bun"] },
"include": ["src/**/*"]
}The base carries no include, exclude, paths, types or
jsx: each of these describes one repository and lives in its
file. The same goes for allowJs, allowImportingTsExtensions,
and for outDir and rootDir, which matter only once a consumer
turns noEmit back off. typescript 5.4 or newer is the
consumer's to install; module Preserve arrived with 5.4.
Options
libandtargetESNext- the runtime is Bun or a current Node, and a bundler lowers what it mustmodulePreserve,moduleResolutionbundler,moduleDetectionforce- every file is a module, imports are left as written and resolved the way a bundler does;esModuleInteropfollows frommodulePreserveverbatimModuleSyntax- a type-only import is written asimport type, so what the compiler drops is visible in the sourcenoEmit- the type check is the job; emitting is a bundler'sstrict,skipLibChecknoFallthroughCasesInSwitch,noUncheckedIndexedAccess,noImplicitOverridenoUnusedLocals,noUnusedParameters,noPropertyAccessFromIndexSignatureoff - ESLint'sunused-importsrules report unused names once, as warnings, and index signatures are read with dot access
Publishing
Releases are staged, never pushed live by a machine. A push to
main with a new version in package.json runs
.github/workflows/publish-npm.yml in the dotfiles repository,
which stages the version on npmjs through trusted publishing
(GitHub OIDC, no token; no provenance, which npm attaches only
for public source repositories). A maintainer then approves it
with two-factor authentication - npm stage approve or the
package page - and only then is it on the registry. An unchanged
version stages nothing and says so. Bump the version here to
release; patch bumps (0.0.x) by default.
