From 97a592721b72e66677df743e98021ffa9f7aaba1 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Thu, 9 Jun 2022 16:10:44 +0200 Subject: [PATCH] chore(tsconfig): move compilerOptions up (#6489) 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`. --- client/tsconfig.json | 6 ------ filecheck/tsconfig.json | 4 ---- markdown/tsconfig.json | 5 ++--- tool/tsconfig.json | 4 +--- tsconfig.dist.json | 3 --- tsconfig.json | 6 ++++++ 6 files changed, 9 insertions(+), 19 deletions(-) diff --git a/client/tsconfig.json b/client/tsconfig.json index 20580dfbf781..7391fec376d2 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -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, diff --git a/filecheck/tsconfig.json b/filecheck/tsconfig.json index b1350f25544b..379a994d81f6 100644 --- a/filecheck/tsconfig.json +++ b/filecheck/tsconfig.json @@ -1,8 +1,4 @@ { "extends": "../tsconfig.json", - "compilerOptions": { - "skipLibCheck": true, - "moduleResolution": "node" - }, "include": ["."] } diff --git a/markdown/tsconfig.json b/markdown/tsconfig.json index 0addaf83b904..c577bafde441 100644 --- a/markdown/tsconfig.json +++ b/markdown/tsconfig.json @@ -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"] diff --git a/tool/tsconfig.json b/tool/tsconfig.json index 04b6b5e57862..8f6beb0e0a02 100644 --- a/tool/tsconfig.json +++ b/tool/tsconfig.json @@ -1,9 +1,7 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "skipLibCheck": true, - "importsNotUsedAsValues": "remove", - "moduleResolution": "node" + "importsNotUsedAsValues": "remove" }, "include": ["."] } diff --git a/tsconfig.dist.json b/tsconfig.dist.json index c311dd4771c0..7483d04ef53a 100644 --- a/tsconfig.dist.json +++ b/tsconfig.dist.json @@ -1,9 +1,6 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "esModuleInterop": true, - "resolveJsonModule": true, - "skipLibCheck": true, "module": "CommonJS", "sourceMap": true }, diff --git a/tsconfig.json b/tsconfig.json index 82c9c0afc475..bb6cbc74f27d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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