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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with
11 additions and
21 deletions
-
apps/client/tsconfig.app.json
-
apps/client/tsconfig.json
-
apps/client/tsconfig.spec.json
-
libs/common/tsconfig.json
-
libs/ui/tsconfig.json
-
libs/ui/tsconfig.lib.json
-
libs/ui/tsconfig.spec.json
-
tsconfig.base.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"], |
|
|
|
|
|
|
|
@ -20,9 +20,7 @@ |
|
|
|
"strictTemplates": false |
|
|
|
}, |
|
|
|
"compilerOptions": { |
|
|
|
"lib": ["dom", "es2022"], |
|
|
|
"module": "preserve", |
|
|
|
"strictNullChecks": true, |
|
|
|
"target": "es2020" |
|
|
|
"strictNullChecks": true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -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"] |
|
|
|
|
|
|
|
@ -12,7 +12,6 @@ |
|
|
|
], |
|
|
|
"compilerOptions": { |
|
|
|
"module": "preserve", |
|
|
|
"lib": ["dom", "es2022"], |
|
|
|
"strictNullChecks": true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -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 |
|
|
|
}, |
|
|
|
|
|
|
|
@ -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", |
|
|
|
|
|
|
|
@ -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"] |
|
|
|
|
|
|
|
@ -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, |
|
|
|
|