Skip to content

Commit e2af351

Browse files
committed
build: Configure TypeScript for better module handling and strictness
1 parent e488fc5 commit e2af351

2 files changed

Lines changed: 8 additions & 13 deletions

File tree

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"editor.codeActionsOnSave": {
55
"source.fixAll.eslint": "explicit",
66
"source.organizeImports": "never"
7-
}
7+
},
8+
"typescript.tsdk": "node_modules/typescript/lib"
89
}

tsconfig.json

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
11
{
22
"compilerOptions": {
3-
// Enable latest features
43
"target": "ESNext",
54
"lib": ["ESNext"],
65
"module": "ESNext",
76
"skipLibCheck": true,
87

9-
10-
11-
// Bundler mode
12-
"moduleResolution": "bundler",
13-
"allowImportingTsExtensions": true,
8+
"moduleResolution": "Bundler",
9+
"moduleDetection": "force",
10+
"erasableSyntaxOnly": true,
1411
"verbatimModuleSyntax": true,
1512
"noEmit": true,
1613

17-
// Best practices
1814
"strict": true,
15+
"noUnusedLocals": true,
16+
"noUnusedParameters": true,
1917
"noFallthroughCasesInSwitch": true,
20-
21-
// Some stricter flags (disabled by default)
22-
"noUnusedLocals": false,
23-
"noUnusedParameters": false,
24-
"noPropertyAccessFromIndexSignature": false,
18+
"noUncheckedSideEffectImports": true,
2519

2620
"baseUrl": ".",
2721
"paths": {

0 commit comments

Comments
 (0)