From 2daface80543ce3d1599761018f2f9375cb97741 Mon Sep 17 00:00:00 2001 From: Gregory Joseph Date: Fri, 13 Dec 2024 16:14:54 +1100 Subject: [PATCH] Align tsconfig.json files * order of elements but also values: * module: nodeNext, moduleResolution: nodeNext, esModuleInterop: true, resolveJsonModule: true * tichu-term-client still uses commonjs for now (#829) --- .../tichu-client-ts-lib/tsconfig.json | 19 ++++++++++------- .../packages/tichu-term-client/tsconfig.json | 19 ++++++++++------- .../packages/tichu-web/tsconfig.json | 21 +++++++++++++------ 3 files changed, 37 insertions(+), 22 deletions(-) diff --git a/tichu-clients/packages/tichu-client-ts-lib/tsconfig.json b/tichu-clients/packages/tichu-client-ts-lib/tsconfig.json index 70f72c498..046c3d479 100644 --- a/tichu-clients/packages/tichu-client-ts-lib/tsconfig.json +++ b/tichu-clients/packages/tichu-client-ts-lib/tsconfig.json @@ -1,19 +1,22 @@ { "compilerOptions": { - "target": "es2023", // when we had es2019, we left a comment to say that: Node doesn't understand nullish coalescing or optional chaining, so instruct ts to transpile + "target": "es2023", "module": "nodenext", + "moduleResolution": "nodenext", + "esModuleInterop": true, + "resolveJsonModule": true, "lib": ["es2023", "dom"], + "types": ["node", "fs-extra"], + + "allowJs": false, "declaration": true, "declarationMap": true, "experimentalDecorators": true, - "outDir": "./lib", - "rootDir": "./src", + "importHelpers": true, "strict": true, - "types": ["node", "fs-extra"], - "esModuleInterop": false, - "moduleResolution": "nodenext", - "resolveJsonModule": true, - "importHelpers": true + + "outDir": "./lib", + "rootDir": "./src" }, "exclude": ["node_modules", "lib", "templates"] } diff --git a/tichu-clients/packages/tichu-term-client/tsconfig.json b/tichu-clients/packages/tichu-term-client/tsconfig.json index 6f458dab5..8b0b1c43c 100644 --- a/tichu-clients/packages/tichu-term-client/tsconfig.json +++ b/tichu-clients/packages/tichu-term-client/tsconfig.json @@ -1,19 +1,22 @@ { "compilerOptions": { - "target": "es2023", // when we had es2019, we left a comment to say that: Node doesn't understand nullish coalescing or optional chaining, so instruct ts to transpile + "target": "es2023", "module": "commonjs", + "moduleResolution": "node", + "esModuleInterop": true, + "resolveJsonModule": true, "lib": ["es2023", "dom"], + "types": ["node", "fs-extra"], + + "allowJs": false, "declaration": true, "declarationMap": true, "experimentalDecorators": true, - "outDir": "./lib", - "rootDir": "./src", + "importHelpers": true, "strict": true, - "types": ["node", "fs-extra"], - "esModuleInterop": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "importHelpers": true + + "outDir": "./lib", + "rootDir": "./src" }, "exclude": ["node_modules", "lib", "templates"] } diff --git a/tichu-clients/packages/tichu-web/tsconfig.json b/tichu-clients/packages/tichu-web/tsconfig.json index 45a191142..6fd4f4594 100644 --- a/tichu-clients/packages/tichu-web/tsconfig.json +++ b/tichu-clients/packages/tichu-web/tsconfig.json @@ -1,18 +1,27 @@ { "compilerOptions": { "target": "es2023", + "module": "nodenext", + "moduleResolution": "nodenext", + "esModuleInterop": true, + "resolveJsonModule": true, "lib": ["dom", "dom.iterable", "esnext"], "types": ["vite/client", "vite-plugin-svgr/client"], - "allowJs": true, + + "allowJs": false, + "declaration": true, + "declarationMap": true, + "experimentalDecorators": true, + "importHelpers": true, + "strict": true, + + "outDir": "./lib", + "rootDir": "./src", + "skipLibCheck": true, - "esModuleInterop": true, "allowSyntheticDefaultImports": true, - "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, - "module": "nodenext", - "moduleResolution": "nodenext", - "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx"