Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Task/modernize TypeScript compiler options (#7642)

Kenrick Tandrian3ae64b5eaff8
diff --git a/apps/client/tsconfig.app.json b/apps/client/tsconfig.app.json
index 56a5535d4a..8e4876ef36 100644
--- a/apps/client/tsconfig.app.json
+++ b/apps/client/tsconfig.app.json
@@ -4,7 +4,6 @@
"outDir": "../../dist/out-tsc",
"types": ["node"],
"typeRoots": ["../../node_modules/@types"],
- "target": "ES2022",
"useDefineForClassFields": false
},
"files": ["src/main.ts", "src/polyfills.ts"],
diff --git a/apps/client/tsconfig.json b/apps/client/tsconfig.json
index ae0aaf61a1..0aa9255709 100644
--- a/apps/client/tsconfig.json
+++ b/apps/client/tsconfig.json
@@ -20,9 +20,7 @@
"strictTemplates": false
},
"compilerOptions": {
- "lib": ["dom", "es2022"],
"module": "preserve",
- "strictNullChecks": true,
- "target": "es2020"
+ "strictNullChecks": true
}
}
diff --git a/apps/client/tsconfig.spec.json b/apps/client/tsconfig.spec.json
index 36a2e401c3..8afad0f4ca 100644
--- a/apps/client/tsconfig.spec.json
+++ b/apps/client/tsconfig.spec.json
@@ -4,8 +4,7 @@
"outDir": "../../dist/out-tsc",
"module": "preserve",
"isolatedModules": true,
- "types": ["jest", "node"],
- "target": "es2016"
+ "types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"]
diff --git a/libs/common/tsconfig.json b/libs/common/tsconfig.json
index 2b4603b718..47d6668d93 100644
--- a/libs/common/tsconfig.json
+++ b/libs/common/tsconfig.json
@@ -12,7 +12,6 @@
],
"compilerOptions": {
"module": "preserve",
- "lib": ["dom", "es2022"],
"strictNullChecks": true
}
}
diff --git a/libs/ui/tsconfig.json b/libs/ui/tsconfig.json
index 51348a52a0..a4a489ea25 100644
--- a/libs/ui/tsconfig.json
+++ b/libs/ui/tsconfig.json
@@ -14,12 +14,11 @@
}
],
"compilerOptions": {
- "lib": ["dom", "es2022"],
"module": "preserve",
- "target": "es2020",
// TODO: Remove once solved in tsconfig.base.json
"strict": false,
"strictNullChecks": true,
+ "useDefineForClassFields": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
diff --git a/libs/ui/tsconfig.lib.json b/libs/ui/tsconfig.lib.json
index 6fbed6f1c8..b361c0b093 100644
--- a/libs/ui/tsconfig.lib.json
+++ b/libs/ui/tsconfig.lib.json
@@ -2,12 +2,10 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
- "target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
- "types": [],
- "lib": ["dom", "es2022"]
+ "types": []
},
"exclude": [
"src/test-setup.ts",
diff --git a/libs/ui/tsconfig.spec.json b/libs/ui/tsconfig.spec.json
index 36a2e401c3..8afad0f4ca 100644
--- a/libs/ui/tsconfig.spec.json
+++ b/libs/ui/tsconfig.spec.json
@@ -4,8 +4,7 @@
"outDir": "../../dist/out-tsc",
"module": "preserve",
"isolatedModules": true,
- "types": ["jest", "node"],
- "target": "es2016"
+ "types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"]
diff --git a/tsconfig.base.json b/tsconfig.base.json
index f831040a02..a74d9910f3 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -9,18 +9,17 @@
"esModuleInterop": true,
"experimentalDecorators": true,
"importHelpers": true,
- "target": "es2015",
+ "target": "es2022",
"module": "esnext",
"typeRoots": ["node_modules/@types"],
- "lib": ["es2017", "dom"],
+ "lib": ["dom", "es2022"],
"skipLibCheck": true,
"skipDefaultLibCheck": true,
- "baseUrl": ".",
"paths": {
- "@ghostfolio/api/*": ["apps/api/src/*"],
- "@ghostfolio/client/*": ["apps/client/src/app/*"],
- "@ghostfolio/common/*": ["libs/common/src/lib/*"],
- "@ghostfolio/ui/*": ["libs/ui/src/lib/*"]
+ "@ghostfolio/api/*": ["./apps/api/src/*"],
+ "@ghostfolio/client/*": ["./apps/client/src/app/*"],
+ "@ghostfolio/common/*": ["./libs/common/src/lib/*"],
+ "@ghostfolio/ui/*": ["./libs/ui/src/lib/*"]
},
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,