Skip to content

type-checking

Files under @repobuddy/typescript/tsconfig/type-checking/ match the Type Checking category of the TSConfig reference. Each file is a superset of the one before it.

Option recommended buddy buddy-strictest
strict yes yes yes
exactOptionalPropertyTypes yes yes yes
noPropertyAccessFromIndexSignature yes yes
noUncheckedIndexedAccess yes yes
noUnusedLocals yes yes
noUnusedParameters yes yes
noFallthroughCasesInSwitch yes
noImplicitOverride yes
noImplicitReturns yes

The files do not extend each other. Each lists its options in full.

{
"compilerOptions": {
"exactOptionalPropertyTypes": true,
"strict": true
}
}

The recommended type checking settings. Used by tsconfig/monorepo.

{
"compilerOptions": {
"exactOptionalPropertyTypes": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true
}
}
{
"compilerOptions": {
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true
}
}

To use it with the monorepo preset, put it after the preset so its options win:

tsconfig.json
{
"extends": [
"@repobuddy/typescript/tsconfig/monorepo",
"@repobuddy/typescript/tsconfig/type-checking/buddy-strictest"
]
}