Browse Source

Task/modernize TypeScript compiler options (#7642)

* fix(ts): remove baseUrl from config

* feat(ts): upgrade base target to es2022

* fix(client): clean up typescript target configurations

* fix(ui): standardize tsconfig target configuration to es2021

* fix(ts): remove redundant project-level lib configurations

* fix(ui): inherit base tsconfig target compiler option
pull/7646/head
Kenrick Tandrian 1 day ago
committed by GitHub
parent
commit
3ae64b5eaf
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      apps/client/tsconfig.app.json
  2. 4
      apps/client/tsconfig.json
  3. 3
      apps/client/tsconfig.spec.json
  4. 1
      libs/common/tsconfig.json
  5. 3
      libs/ui/tsconfig.json
  6. 4
      libs/ui/tsconfig.lib.json
  7. 3
      libs/ui/tsconfig.spec.json
  8. 13
      tsconfig.base.json

1
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"],

4
apps/client/tsconfig.json

@ -20,9 +20,7 @@
"strictTemplates": false
},
"compilerOptions": {
"lib": ["dom", "es2022"],
"module": "preserve",
"strictNullChecks": true,
"target": "es2020"
"strictNullChecks": true
}
}

3
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"]

1
libs/common/tsconfig.json

@ -12,7 +12,6 @@
],
"compilerOptions": {
"module": "preserve",
"lib": ["dom", "es2022"],
"strictNullChecks": true
}
}

3
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
},

4
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",

3
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"]

13
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,

Loading…
Cancel
Save