-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
62 lines (61 loc) · 3.05 KB
/
tsconfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
// https://typestrong.org/ts-node/docs/configuration
// https://github.com/tsconfig/bases/#node-22-tsconfigjson
// https://stackoverflow.com/questions/63742790/unable-to-import-esm-ts-module-in-node/65163089#65163089
// https://2ality.com/2025/01/tsconfig-json.html
// NICHT "strictest" wegen "experimentalDecorators"
// "extends": ["@tsconfig/strictest/tsconfig", "@tsconfig/node22/tsconfig"],
"extends": ["@tsconfig/node23/tsconfig"],
"ts-node": {
"esm": true,
"module": "es2024",
// "experimentalSpecifierResolution": "node"
// "transpileOnly": true,
// "files": true,
},
"include": ["src/**/*", "__tests__/**/*"],
"compilerOptions": {
// "rootDir": ".",
"outDir": "./dist",
"lib": ["ES2024"],
// uebersetzter JS-Code im Hinblick auf Module. "NodeNext" erfordert dasselbe fuer "moduleResolution"
// "module": "NodeNext", // entspricht "Node16"
"module": "ES2022",
// Wie werden zu importierende Module im Dateisystem gefunden?
// "moduleResolution": "nodenext",
"moduleResolution": "node",
"moduleDetection": "force", // default: "auto"
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
// https://www.typescriptlang.org/tsconfig/#target
"target": "es2024",
// "target": "es2022",
"sourceMap": true,
"incremental": true,
"skipLibCheck": true, // wegen @nestjs/graphql und @nestjs/apollo
"allowUnreachableCode": false, // return bei then-else und try-catch
"allowUnusedLabels": false, // Labels muessen auch benutzt werden
"esModuleInterop": true, // Kompatibilitaet zwischen CommonJS und ES Modulen
// "exactOptionalPropertyTypes": true, // bei optionalen Properties ggf. explizit undefined spezifizieren
"forceConsistentCasingInFileNames": true, // Gross-/Kleinschreibung bei Dateinamen
"noErrorTruncation": true,
"noFallthroughCasesInSwitch": true, // "break" muss bei switch vorhanden sein
"noImplicitAny": true, // Fehler bei implizitem Typ "any"
"noImplicitOverride": true, // Schluesselwort "override"
"noImplicitReturns": true, // bei jedem Code-Pfad muss es "return" geben
"noImplicitThis": true, // Fehler bei this mit implizitem "any"
"noUncheckedIndexedAccess": true, // undefined bei Resultaten fuer Index-Signaturen
"noUnusedLocals": true, // keine nicht-benutzten lokalen Variablen
"noUnusedParameters": true, // keine nicht-benutzen Parameter
"preserveWatchOutput": true,
"strict": true // alle "strict"-Optionen aktivieren
// "noImplicitAny": true, // Fehler bei implizitem Typ "any", default bei strict
// "noImplicitThis": true, // Fehler bei this mit implizitem "any", default bei strict
// "useUnknownInCatchVariables": true // unknown als default-Typ bei catch-Klauseln, default bei strict
// "noPropertyAccessFromIndexSignature": true, // Fehler in __tests__ bei dot-Zugriff auf nicht-definierte Properties, z.B. response.data.statusCode
// "allowJs": true, // wegen ts-jest und ESM
}
}