chore(config): pin @types/bun, tighten TypeScript strictness, and refactor config logic

- Pin `@types/bun` to `^1.3.14` for reproducible builds instead of using `latest`
- Update `tsconfig.json` with stricter type-checking flags and reorganize compiler options
- Refactor `initConfig` to DRY up the model default logic and add a null guard before process exit
This commit is contained in:
mitchell 2026-05-26 19:27:41 -04:00
parent d98ddb3ca7
commit f668037582
5 changed files with 39 additions and 26 deletions

View file

@ -1,29 +1,39 @@
{
// Visit https://aka.ms/tsconfig to read more about this file
"compilerOptions": {
// Environment setup & latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
// Bundler mode
// Environment Settings
// See also https://aka.ms/tsconfig/module
"module": "esnext",
"target": "esnext",
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"esModuleInterop": true,
"noEmit": true,
// For nodejs:
"lib": ["esnext"],
"types": ["bun"],
// and npm install -D @types/node
// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
// Stricter Typechecking Options
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"exactOptionalPropertyTypes": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false
// Style Options
"noImplicitReturns": true,
"noImplicitOverride": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": true,
// Recommended Options
"strict": true,
"jsx": "react-jsx",
//"allowImportingTsExtensions": true,
"allowArbitraryExtensions": true,
"verbatimModuleSyntax": true,
"isolatedModules": true,
"noUncheckedSideEffectImports": true,
"moduleDetection": "force",
"skipLibCheck": true
}
}