Skip to content

Instantly share code, notes, and snippets.

@alexdanilowicz
Created January 25, 2025 15:56
Show Gist options
  • Select an option

  • Save alexdanilowicz/144b484087f7fa4399d858dc3386cca5 to your computer and use it in GitHub Desktop.

Select an option

Save alexdanilowicz/144b484087f7fa4399d858dc3386cca5 to your computer and use it in GitHub Desktop.
Relaxed tsconfig
{
"compilerOptions": {
// Keep your targets & libs the same
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
// Bundler mode (same as before)
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
// Let TS skip .d.ts checks
"skipLibCheck": true,
// Allow default imports for packages that use `export =`
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
// If you REALLY want to ignore TS errors and keep building:
// - noEmitOnError: false -> still emits (or doesn't block bundler)
// - noEmit: true -> if you're relying on a separate bundler
"noEmitOnError": false,
"noEmit": true,
// Turn off strict type checks so the build won't fail on errors
"strict": false,
// Turn off "unused" checks so they won't error out
"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true,
// React 18+ JSX transform
"jsx": "react-jsx"
},
"include": ["src"],
// If you still need this reference for node config, keep it
"references": [{ "path": "./tsconfig.node.json" }]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment