Skip to content

Commit 05a037f

Browse files
committed
build(tsconfig.ts): modernize and improve compilerOptions
1 parent daefccb commit 05a037f

File tree

4 files changed

+32
-17
lines changed

4 files changed

+32
-17
lines changed

eslint.config.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// @ts-check
2-
31
import eslint from "@eslint/js";
42
import tseslint from "typescript-eslint";
53
import eslintConfigPrettier from "eslint-config-prettier";

tsconfig.build.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
/* Emit */
5+
"rootDir": "src"
6+
},
7+
"include": ["./src"],
8+
"exclude": ["./src/**/*.test.ts"]
9+
}

tsconfig.eslint.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

tsconfig.json

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,41 @@
11
{
22
"compilerOptions": {
33
/* Type checking */
4+
// "exactOptionalPropertyTypes": true,
5+
"forceConsistentCasingInFileNames": true,
6+
"noFallthroughCasesInSwitch": true,
7+
"noImplicitOverride": true,
8+
"noImplicitReturns": true,
9+
// "noUncheckedIndexedAccess": true,
10+
"noPropertyAccessFromIndexSignature": true,
11+
"noUnusedLocals": true,
12+
"noUnusedParameters": true,
413
"strict": true,
514

615
/* Modules */
7-
"module": "esnext",
8-
"moduleResolution": "node",
9-
"rootDir": "./src",
16+
"module": "NodeNext",
17+
"noUncheckedSideEffectImports": true,
18+
"types": ["jest"],
1019

1120
/* Language and Environment */
12-
"target": "es6",
21+
"lib": ["ES2022", "DOM"],
22+
"moduleDetection": "force",
23+
"target": "ES2022",
24+
25+
/* Output Formatting */
26+
"noErrorTruncation": true,
1327

1428
/* Emit */
1529
"declaration": true,
1630
"declarationMap": true,
17-
"importHelpers": true,
31+
"inlineSources": true,
32+
"outDir": "lib",
1833
"sourceMap": true,
19-
"outDir": "./lib",
2034

2135
/* Interop Constraints */
22-
"esModuleInterop": true
36+
// "erasableSyntaxOnly": true,
37+
"isolatedDeclarations": true,
38+
"verbatimModuleSyntax": true
2339
},
24-
"exclude": [
25-
"src/**/*.test.ts",
26-
],
2740
"include": ["./src"]
2841
}

0 commit comments

Comments
 (0)