Skip to content

Commit 879c235

Browse files
authored
chore: improve tsconfig.json (discordjs#8)
1 parent 8f533e4 commit 879c235

File tree

5 files changed

+53
-35
lines changed

5 files changed

+53
-35
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"scripts": {
1313
"prebuild": "npm run clean",
14-
"build": "tsc -b src && gen-esm-wrapper ./dist/index.js ./dist/index.mjs",
14+
"build": "tsc && gen-esm-wrapper ./dist/index.js ./dist/index.mjs",
1515
"clean": "rimraf dist",
1616
"lint": "eslint --ext mjs,ts src/**/*.ts",
1717
"lint:fix": "eslint --fix --ext mjs,ts src/**/*.ts",

src/tsconfig.json

-9
This file was deleted.

tsconfig.base.json

-24
This file was deleted.

tsconfig.eslint.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./tsconfig.base.json",
2+
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"allowJs": true
55
},

tsconfig.json

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
// Mapped from https://www.typescriptlang.org/tsconfig
3+
"compilerOptions": {
4+
// Type Checking
5+
"alwaysStrict": true,
6+
"allowUnreachableCode": false,
7+
"allowUnusedLabels": false,
8+
// TypeScript 4.4
9+
// "exactOptionalPropertyTypes": true,
10+
"noFallthroughCasesInSwitch": true,
11+
"noImplicitOverride": true,
12+
"noImplicitReturns": true,
13+
"noUnusedLocals": true,
14+
"noUnusedParameters": true,
15+
"strict": true,
16+
// TypeScript 4.4
17+
// "useUnknownInCatchVariables": true,
18+
19+
// Modules
20+
"module": "CommonJS",
21+
"moduleResolution": "node",
22+
"resolveJsonModule": true,
23+
24+
// Emit
25+
"declaration": true,
26+
"declarationMap": true,
27+
"importHelpers": true,
28+
"importsNotUsedAsValues": "error",
29+
"inlineSources": true,
30+
"newLine": "lf",
31+
"noEmitHelpers": true,
32+
"outDir": "dist",
33+
"preserveConstEnums": true,
34+
"removeComments": false,
35+
"sourceMap": true,
36+
"sourceRoot": "/",
37+
"esModuleInterop": true,
38+
"forceConsistentCasingInFileNames": true,
39+
40+
// Language and Environment
41+
"emitDecoratorMetadata": true,
42+
"experimentalDecorators": true,
43+
"lib": ["ESNext"],
44+
"target": "ES2020",
45+
"useDefineForClassFields": true,
46+
47+
// Completeness
48+
"skipLibCheck": true
49+
},
50+
"include": ["src/**/*.ts"]
51+
}

0 commit comments

Comments
 (0)