Skip to content

Commit

Permalink
chore: improve tsconfig.json (discordjs#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
iCrawl authored Jul 13, 2021
1 parent 8f533e4 commit 879c235
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 35 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"scripts": {
"prebuild": "npm run clean",
"build": "tsc -b src && gen-esm-wrapper ./dist/index.js ./dist/index.mjs",
"build": "tsc && gen-esm-wrapper ./dist/index.js ./dist/index.mjs",
"clean": "rimraf dist",
"lint": "eslint --ext mjs,ts src/**/*.ts",
"lint:fix": "eslint --fix --ext mjs,ts src/**/*.ts",
Expand Down
9 changes: 0 additions & 9 deletions src/tsconfig.json

This file was deleted.

24 changes: 0 additions & 24 deletions tsconfig.base.json

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"allowJs": true
},
Expand Down
51 changes: 51 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
// Mapped from https://www.typescriptlang.org/tsconfig
"compilerOptions": {
// Type Checking
"alwaysStrict": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
// TypeScript 4.4
// "exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
// TypeScript 4.4
// "useUnknownInCatchVariables": true,

// Modules
"module": "CommonJS",
"moduleResolution": "node",
"resolveJsonModule": true,

// Emit
"declaration": true,
"declarationMap": true,
"importHelpers": true,
"importsNotUsedAsValues": "error",
"inlineSources": true,
"newLine": "lf",
"noEmitHelpers": true,
"outDir": "dist",
"preserveConstEnums": true,
"removeComments": false,
"sourceMap": true,
"sourceRoot": "/",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,

// Language and Environment
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["ESNext"],
"target": "ES2020",
"useDefineForClassFields": true,

// Completeness
"skipLibCheck": true
},
"include": ["src/**/*.ts"]
}

0 comments on commit 879c235

Please sign in to comment.