Skip to content

Commit 6fdd373

Browse files
committed
fix: update module settings and type checking options
- Changed module setting from "ESNext" to "preserve" for better compatibility. - Removed "moduleResolution" setting and adjusted type checking options, including enabling "noUncheckedIndexedAccess" and "noImplicitOverride". - Updated the readme to reflect the removal of "moduleResolution" from the TypeScript configuration.
1 parent bad6db3 commit 6fdd373

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

packages/configs/readme.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ For typescript code bases:
6060
"extends": "@hugomrdias/configs/tsconfig",
6161
"compilerOptions": {
6262
"outDir": "dist",
63-
"module": "NodeNext",
64-
"moduleResolution": "NodeNext"
63+
"module": "NodeNext"
6564
},
6665
"include": ["src", "test"]
6766
}

packages/configs/tsconfig.json

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,48 @@
33
/* Projects */
44
"incremental": true,
55
"composite": true,
6+
67
/* Language and Environment */
78
"target": "es2024",
89
"lib": ["ES2024", "DOM", "DOM.Iterable"],
910
"moduleDetection": "force",
11+
1012
/* Modules */
11-
"module": "ESNext", // "NodeNext"
12-
"moduleResolution": "Bundler", // "NodeNext"
13+
"module": "preserve", // "NodeNext"
1314
"resolveJsonModule": true,
15+
"rewriteRelativeImportExtensions": true,
16+
1417
/* JavaScript Support */
1518
"allowJs": true,
1619
"checkJs": true,
20+
1721
/* Emit */
22+
"outDir": "dist",
1823
"declaration": true,
1924
"declarationMap": true,
2025
"emitDeclarationOnly": false,
2126
"sourceMap": true,
22-
"outDir": "dist",
2327
"removeComments": false,
2428
"noEmit": false,
2529
"importsNotUsedAsValues": "remove",
2630
"stripInternal": true,
2731
"noEmitOnError": true,
32+
2833
/* Interop Constraints */
2934
"isolatedModules": true,
3035
"verbatimModuleSyntax": true,
3136
"esModuleInterop": true,
3237
"forceConsistentCasingInFileNames": true,
38+
"erasableSyntaxOnly": true,
39+
3340
/* Type Checking */
3441
"strict": true,
35-
"noFallthroughCasesInSwitch": true,
36-
"noImplicitReturns": false,
37-
"noUnusedLocals": true,
38-
"noUnusedParameters": false,
42+
"noUncheckedIndexedAccess": true,
43+
"noImplicitOverride": true,
44+
// "noFallthroughCasesInSwitch": true,
45+
// "noImplicitReturns": false,
46+
// "noUnusedLocals": true,
47+
// "noUnusedParameters": false,
3948
"skipLibCheck": true
4049
}
4150
}

0 commit comments

Comments
 (0)