From c66131a4e91aa4b55f626ec50625bf773576ff5d Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Thu, 2 Nov 2017 01:52:36 +0700 Subject: [PATCH] Tweaks to tsconfig.json (#21) I removed options that were the same as the default and added some missing useful ones. --- source/lib/argument-error.ts | 2 +- tsconfig.json | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/source/lib/argument-error.ts b/source/lib/argument-error.ts index 91249b2..5168735 100644 --- a/source/lib/argument-error.ts +++ b/source/lib/argument-error.ts @@ -2,7 +2,7 @@ export class ArgumentError extends Error { constructor(message, context) { super(message); // TODO: Node does not preserve the error name in output when using the below, why? - // Error.captureStackTrace(this, context); + Error.captureStackTrace(this, context); this.name = 'ArgumentError'; } } diff --git a/tsconfig.json b/tsconfig.json index 6848305..66d8fb5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,21 +1,24 @@ { "compilerOptions": { + "outDir": "dist", "target": "es5", + "lib": [ + "es2015" + ], "module": "commonjs", - "declaration": false, - "removeComments": false, + "moduleResolution": "node", "pretty": true, - "allowUnreachableCode": false, - "allowUnusedLabels": false, + "newLine": "lf", + "stripInternal": true, "noImplicitAny": false, - "noImplicitUseStrict": false, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, "allowSyntheticDefaultImports": true, "strictNullChecks": true, - "outDir": "dist", - "lib": [ - "es2015" - ] + "alwaysStrict": true }, "exclude": [ "node_modules",