mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Fix frontend tsconfig for TypeScript 6.0
TypeScript 6.0 requires an explicit `rootDir` when linked-plugin symlinks push the common source directory outside the project (TS5011), and type declarations even for side-effect imports such as `moment/locale/*` (TS2882). Angular 22 also rejects `extendedDiagnostics` while `strictTemplates` is off (NG4003).
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
|||||||
|
// moment ships its locale files without type declarations.
|
||||||
|
// TypeScript 6.0 requires declarations even for side-effect imports (TS2882).
|
||||||
|
declare module 'moment/locale/*';
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./out-tsc/app",
|
"outDir": "./out-tsc/app",
|
||||||
|
"rootDir": "..",
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"types": []
|
"types": []
|
||||||
},
|
},
|
||||||
@@ -21,12 +22,6 @@
|
|||||||
"src/stimulus/controllers/**/*.spec.ts"
|
"src/stimulus/controllers/**/*.spec.ts"
|
||||||
],
|
],
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"extendedDiagnostics": {
|
|
||||||
"checks": {
|
|
||||||
"nullishCoalescingNotNullable": "suppress",
|
|
||||||
"optionalChainNotNullable": "suppress"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"strictTemplates": false
|
"strictTemplates": false
|
||||||
},
|
},
|
||||||
"types": [
|
"types": [
|
||||||
|
|||||||
@@ -20,12 +20,6 @@
|
|||||||
"src/app/**/*.module.ts"
|
"src/app/**/*.module.ts"
|
||||||
],
|
],
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"extendedDiagnostics": {
|
|
||||||
"checks": {
|
|
||||||
"nullishCoalescingNotNullable": "suppress",
|
|
||||||
"optionalChainNotNullable": "suppress"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"strictTemplates": false
|
"strictTemplates": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user