UNPKG

@zanminkian/tsconfig

Version:

Strict shared tsconfig out-of-box.

53 lines (51 loc) 2.05 kB
{ "compilerOptions": { // copied from `@tsconfig/node16-strictest` "lib": [ "es2021" ], "module": "Node16", "target": "es2021", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "moduleResolution": "node16", "allowUnusedLabels": false, "allowUnreachableCode": false, "exactOptionalPropertyTypes": true, "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, "noImplicitReturns": true, "noPropertyAccessFromIndexSignature": true, "noUncheckedIndexedAccess": true, "noUnusedLocals": true, "noUnusedParameters": true, // "importsNotUsedAsValues": "error", // Remove it to support ts 5.0 "checkJs": true, "allowSyntheticDefaultImports": true, /** * 1. Typescript will include APIs for newer JS features matching the `target`. See https://www.typescriptlang.org/tsconfig#lib. Therefore, there is no need to add "ESNext" to lib. * 2. In ts 4.5, lib files can be overrode by npm modules. See https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#supporting-lib-from-node_modules. Therefore, libs like "DOM" can be included by installing `@types/web`. No need to add "DOM" to lib. */ // "lib": ["ESNext", "DOM"], "experimentalDecorators": true, "emitDecoratorMetadata": true, /** * Ts will load all the `node_modules/@types/*` declaration files when `types` is removed. * Remove it will improve the extensibility. */ // "types": ["node", "jest"], "resolveJsonModule": true, "declaration": true, /* Disabled because of https://github.com/Microsoft/TypeScript/issues/29172 */ // "outDir": "dist", "inlineSourceMap": true, "isolatedModules": true, "jsx": "preserve" /** * TODO: Disable it because of the conflict with `@antfu/eslint-config`. Remove it if https://github.com/antfu/eslint-config/pull/145 has been accepted. */ // "noPropertyAccessFromIndexSignature": false, } }