Skip to content

Commit abefd64

Browse files
committed
update recommended tsconfig for apps
1 parent 840f317 commit abefd64

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,28 +1481,33 @@ This is not yet written. Please PR or [File an issue](https://github.com/typescr
14811481

14821482
# Troubleshooting Handbook: tsconfig.json
14831483

1484-
You can find [all the Compiler options in the Typescript docs](https://www.typescriptlang.org/docs/handbook/compiler-options.html). This is the setup I roll with for my component library:
1484+
You can find [all the Compiler options in the Typescript docs](https://www.typescriptlang.org/docs/handbook/compiler-options.html). This is the setup I roll with for APPS (not libraries - for libraries you may wish to see the settings we use in `tsdx`):
14851485

14861486
```json
14871487
{
14881488
"compilerOptions": {
1489+
"incremental": true,
14891490
"outDir": "build/lib",
1490-
"module": "commonjs",
14911491
"target": "es5",
1492-
"lib": ["es5", "es6", "es7", "es2017", "dom"],
1492+
"module": "esnext",
1493+
"lib": ["dom", "esnext"],
14931494
"sourceMap": true,
1495+
"importHelpers": true,
1496+
"declaration": true,
1497+
"rootDir": "src",
1498+
"strict": true,
1499+
"alwaysStrict": true,
1500+
"noUnusedLocals": true,
1501+
"noUnusedParameters": true,
1502+
"noImplicitReturns": true,
1503+
"noFallthroughCasesInSwitch": true,
14941504
"allowJs": false,
14951505
"jsx": "react",
14961506
"moduleResolution": "node",
1497-
"rootDir": "src",
14981507
"baseUrl": "src",
14991508
"forceConsistentCasingInFileNames": true,
1500-
"noImplicitReturns": true,
1501-
"strict": true,
15021509
"esModuleInterop": true,
15031510
"suppressImplicitAnyIndexErrors": true,
1504-
"noUnusedLocals": true,
1505-
"declaration": true,
15061511
"allowSyntheticDefaultImports": true,
15071512
"experimentalDecorators": true
15081513
},

0 commit comments

Comments
 (0)