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.
type-checking/recommended
Section titled “type-checking/recommended”{ "compilerOptions": { "exactOptionalPropertyTypes": true, "strict": true }}type-checking/buddy
Section titled “type-checking/buddy”The recommended type checking settings. Used by tsconfig/monorepo.
{ "compilerOptions": { "exactOptionalPropertyTypes": true, "noPropertyAccessFromIndexSignature": true, "noUncheckedIndexedAccess": true, "noUnusedLocals": true, "noUnusedParameters": true, "strict": true }}type-checking/buddy-strictest
Section titled “type-checking/buddy-strictest”{ "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:
{ "extends": [ "@repobuddy/typescript/tsconfig/monorepo", "@repobuddy/typescript/tsconfig/type-checking/buddy-strictest" ]}