Skip to content

Instantly share code, notes, and snippets.

@alshdavid
Created July 12, 2023 23:41
Show Gist options
  • Save alshdavid/623e32cf1186a560dc43c351e9be5df5 to your computer and use it in GitHub Desktop.
Save alshdavid/623e32cf1186a560dc43c351e9be5df5 to your computer and use it in GitHub Desktop.
Strictest TypeScript config posible
{
"compilerOptions": {
// Resolution (adjust to use case)
"target": "ESNext",
"module": "CommonJS",
"moduleResolution": "Node16",
"lib": ["ESNext"],
"types": ["node"],
// Super strict
"strict": true,
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"forceConsistentCasingInFileNames": true,
// Misc (Use if dependencies have bad types)
"skipLibCheck": true
},
"include": ["./src/**/*.ts"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment