11{
2- // see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
3- "include" : [
4- " src" ,
5- " types"
6- ],
72 "compilerOptions" : {
8- "module" : " esnext" ,
9- "lib" : [
10- " dom" ,
11- " esnext"
12- ],
13- "importHelpers" : true ,
14- // output .d.ts declaration files for consumers
15- "declaration" : true ,
16- // output .js.map sourcemap files for consumers
17- "sourceMap" : true ,
18- // match output dir to input dir. e.g. dist/index instead of dist/src/index
19- "rootDir" : " ./src" ,
20- // stricter type-checking for stronger correctness. Recommended by TS
21- "strict" : true ,
22- // linter checks for common issues
23- "noImplicitReturns" : true ,
24- "noFallthroughCasesInSwitch" : true ,
25- // noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative
26- "noUnusedLocals" : true ,
27- "noUnusedParameters" : false ,
28- // use Node's module resolution algorithm, instead of the legacy TS one
29- "moduleResolution" : " node" ,
30- // transpile JSX to React.createElement
31- "jsx" : " react" ,
32- // interop between ESM and CJS modules. Recommended by TS
3+ /* Base Options: */
334 "esModuleInterop" : true ,
34- // significant perf increase by skipping checking .d.ts files, particularly those in node_modules. Recommended by TS
355 "skipLibCheck" : true ,
36- // error out if import and file system have a casing mismatch. Recommended by TS
37- "forceConsistentCasingInFileNames" : true ,
38- // `tsdx build` ignores this option, but it is commonly used when type-checking separately with `tsc`
6+ "target" : " es2022" ,
7+ "allowJs" : true ,
8+ "resolveJsonModule" : true ,
9+ "moduleDetection" : " force" ,
10+ "isolatedModules" : true ,
11+ "verbatimModuleSyntax" : true ,
12+
13+ /* Strictness */
14+ "strict" : true ,
15+ "noUncheckedIndexedAccess" : true ,
16+ "noImplicitOverride" : true ,
17+
18+ /* AND if you're building for a library: */
19+ "declaration" : true ,
20+ "declarationMap" : true ,
21+
22+ /* If NOT transpiling with TypeScript: */
23+ "module" : " preserve" ,
3924 "noEmit" : true ,
40- "baseUrl" : " ./src"
25+
26+ /* If your code runs in the DOM: */
27+ "lib" : [" es2022" , " dom" , " dom.iterable" ],
4128 }
42- }
29+ }
0 commit comments