Skip to content

Commit

Permalink
chore(tsconfig): move compilerOptions up (#6489)
Browse files Browse the repository at this point in the history
Consolidates our `tsconfig.json` files by moving some 
common `compilerOptions` into our root `tsconfig.json`:
- `allowSyntheticDefaultImports = true`
- `esModuleInterop = true`
- `forceConsistentCasingInFileNames = true`
- `moduleResolution = node`
- `resolveJsonModule = true`
- `skipLibCheck = true`

Exceptions:
- `/markdown/tsconfig.json` needs `esModuleInterop = false`.
- `/client/pwa/tsconfig.json` doesn't extend `/tsconfig.json`.
  • Loading branch information
caugner authored Jun 9, 2022
1 parent c2200d9 commit 97a5927
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 19 deletions.
6 changes: 0 additions & 6 deletions client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noImplicitAny": false,
"noEmit": true,
Expand Down
4 changes: 0 additions & 4 deletions filecheck/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"skipLibCheck": true,
"moduleResolution": "node"
},
"include": ["."]
}
5 changes: 2 additions & 3 deletions markdown/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"esModuleInterop": false,
"target": "es2019",
"lib": ["esnext"],
"skipLibCheck": true,
"moduleResolution": "node"
"lib": ["esnext"]
},
"include": ["h2m/**/*"],
"exclude": ["node_modules"]
Expand Down
4 changes: 1 addition & 3 deletions tool/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"skipLibCheck": true,
"importsNotUsedAsValues": "remove",
"moduleResolution": "node"
"importsNotUsedAsValues": "remove"
},
"include": ["."]
}
3 changes: 0 additions & 3 deletions tsconfig.dist.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"esModuleInterop": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"module": "CommonJS",
"sourceMap": true
},
Expand Down
6 changes: 6 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"skipLibCheck": true,
"strictBindCallApply": true,
"target": "ES2018",
"preserveWatchOutput": true
Expand Down

0 comments on commit 97a5927

Please sign in to comment.