chore: configure typescript project references and shared compiler options

This commit is contained in:
lila 2026-03-20 14:01:48 +01:00
parent 66848f282f
commit 3dfb75ea83
9 changed files with 84 additions and 1 deletions

12
apps/api/tsconfig.json Normal file
View file

@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.base.json",
"references": [
{ "path": "../../packages/shared" },
{ "path": "../../packages/db" },
],
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
},
"include": ["src"],
}

4
apps/web/tsconfig.json Normal file
View file

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../../packages/shared" }],
}

View file

@ -9,6 +9,7 @@
},
"packageManager": "pnpm@10.32.1",
"devDependencies": {
"concurrently": "^9.2.1"
"concurrently": "^9.2.1",
"typescript": "^5.9.3"
}
}

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "./dist",
},
"include": ["src"],
}

View file

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "./dist",
},
"include": ["src"],
}

10
pnpm-lock.yaml generated
View file

@ -11,6 +11,9 @@ importers:
concurrently:
specifier: ^9.2.1
version: 9.2.1
typescript:
specifier: ^5.9.3
version: 5.9.3
apps/api:
dependencies:
@ -114,6 +117,11 @@ packages:
tslib@2.8.1:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
typescript@5.9.3:
resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
engines: {node: '>=14.17'}
hasBin: true
wrap-ansi@7.0.0:
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
engines: {node: '>=10'}
@ -204,6 +212,8 @@ snapshots:
tslib@2.8.1: {}
typescript@5.9.3: {}
wrap-ansi@7.0.0:
dependencies:
ansi-styles: 4.3.0

29
tsconfig.base.json Normal file
View file

@ -0,0 +1,29 @@
{
"compilerOptions": {
"allowJs": true,
"composite": true,
"declaration": true,
"declarationMap": true,
"erasableSyntaxOnly": true,
"esModuleInterop": true,
"exactOptionalPropertyTypes": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"moduleDetection": "force",
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUncheckedSideEffectImports": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "dist",
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "es2022",
"verbatimModuleSyntax": true,
},
}

9
tsconfig.json Normal file
View file

@ -0,0 +1,9 @@
{
"references": [
{ "path": "./packages/shared" },
{ "path": "./packages/db" },
{ "path": "./apps/web" },
{ "path": "./apps/api" },
],
"files": [],
}