@naturalcycles/js-lib
Version:
Standard library for universal (browser + Node.js) javascript
71 lines (65 loc) • 2.24 kB
JSON
//
// @naturalcycles/js-lib/cfg/frontend/tsconfig.json
//
// Shared tsconfig for Frontend applications
//
{
"compilerOptions": {
// Target/module
"target": "es2023", // es2023+ browsers, adjust to your requirements!
"lib": ["esnext", "dom", "dom.iterable"],
"module": "esnext",
"moduleResolution": "bundler",
"moduleDetection": "force",
// specifying these explicitly for better IDE compatibility (but they're on by default with module=nodenext)
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
// Faster compilation in general
// Support for external compilers (e.g esbuild)
// Speedup in Jest by using "isolatedModules" in 'ts-jest' config
"isolatedModules": true,
// Emit
"sourceMap": false,
"declaration": false,
// Otherwise since es2022 it defaults to true
// and starts to produce different/unexpected behavior
// https://angular.schule/blog/2022-11-use-define-for-class-fields
"useDefineForClassFields": true,
"importHelpers": true,
// Strictness
"strict": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"suppressImplicitAnyIndexErrors": false,
"noUncheckedIndexedAccess": true,
"noUncheckedSideEffectImports": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitOverride": true,
// Enabled should be faster, but will catch less errors
// "skipLibCheck": true,
// Disabled because of https://github.com/Microsoft/TypeScript/issues/29172
// Need to be specified in the project tsconfig
// "outDir": "dist",
// "rootDir": "./src",
// "baseUrl": "./",
// "paths": {
// "@src/*": ["src/*"]
// },
// "typeRoots": [
// "node_modules/@types",
// "src/@types"
// ],
// Other
"incremental": true,
"tsBuildInfoFile": "${configDir}/node_modules/.cache/src.tsbuildinfo",
"jsx": "preserve",
"pretty": true,
"newLine": "lf",
"experimentalDecorators": true
// "emitDecoratorMetadata": true // use if needed
}
// Need to be specified in the project tsconfig
// "include": ["src"],
// "exclude": ["**/__exclude", "**/@linked"]
}