TypeScript Config
How we modify our TypeScript code style with tsconfig.json.
TSConfig
Set strict to true, and further increase strictness by modifying the following options:
- allowUnreachableCode
- exactOptionalPropertyTypes
- noImplicitOverride
- noImplicitReturns
- noFallthroughCasesInSwitch
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"strict": true,
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"isolatedModules": true,
}
}