From de361673cf99738231a8422fd8bf3c0fc57c27ff Mon Sep 17 00:00:00 2001 From: d-yokoi Date: Mon, 4 Mar 2019 00:10:12 +0900 Subject: [PATCH] build: add compiler options to forbid unused local variables and parameters --- ts_src/payments/p2sh.ts | 2 +- ts_src/payments/p2wsh.ts | 2 +- tsconfig.json | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ts_src/payments/p2sh.ts b/ts_src/payments/p2sh.ts index 1aa1a94..daaa8cc 100644 --- a/ts_src/payments/p2sh.ts +++ b/ts_src/payments/p2sh.ts @@ -1,5 +1,5 @@ import { Payment, PaymentOpts } from './index' // eslint-disable-line -import { Network, bitcoin as BITCOIN_NETWORK } from '../networks' // eslint-disable-line +import { bitcoin as BITCOIN_NETWORK } from '../networks' // eslint-disable-line import * as bscript from '../script' import * as bcrypto from '../crypto' import * as lazy from './lazy' diff --git a/ts_src/payments/p2wsh.ts b/ts_src/payments/p2wsh.ts index 452dcc3..edb0a69 100644 --- a/ts_src/payments/p2wsh.ts +++ b/ts_src/payments/p2wsh.ts @@ -1,5 +1,5 @@ import { Payment, PaymentOpts } from './index' // eslint-disable-line -import { Network, bitcoin as BITCOIN_NETWORK } from '../networks' // eslint-disable-line +import { bitcoin as BITCOIN_NETWORK } from '../networks' // eslint-disable-line import * as bscript from '../script' import * as bcrypto from '../crypto' import * as lazy from './lazy' diff --git a/tsconfig.json b/tsconfig.json index 0ab4612..f770a45 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,9 @@ "strictPropertyInitialization": true, "noImplicitThis": true, "alwaysStrict": true, - "esModuleInterop": false + "esModuleInterop": false, + "noUnusedLocals": true, + "noUnusedParameters": true }, "include": [ "ts_src/**/*.ts"