Skip to content

Commit 4e50cff

Browse files
committed
build(tsconfig.ts): modernize and improve compilerOptions
1 parent ef2caec commit 4e50cff

4 files changed

Lines changed: 38 additions & 16 deletions

File tree

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: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,48 @@
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+
"moduleResolution": "NodeNext",
18+
"noUncheckedSideEffectImports": true,
19+
"types": [],
1020

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

1429
/* Emit */
1530
"declaration": true,
1631
"declarationMap": true,
1732
"importHelpers": true,
33+
"inlineSources": true,
34+
"outDir": "lib",
1835
"sourceMap": true,
19-
"outDir": "./lib",
2036

2137
/* Interop Constraints */
22-
"esModuleInterop": true
38+
// "erasableSyntaxOnly": true,
39+
"esModuleInterop": true,
40+
"isolatedDeclarations": true,
41+
"isolatedModules": true,
42+
"verbatimModuleSyntax": true,
43+
44+
/* Completeness */
45+
"skipLibCheck": true
2346
},
24-
"exclude": [
25-
"src/**/*.test.ts",
26-
],
2747
"include": ["./src"]
2848
}

0 commit comments

Comments
 (0)