From 9bd9a3b1654ea399a8dff2014827c8d198445f2a Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 19 Oct 2020 16:14:07 +0300 Subject: [PATCH] eslint - dont be quiet. Fix warnings --- package.json | 2 +- src/index.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6ffb088..9d4ade9 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "scripts": { "test": "mocha -r ts-node/register --timeout 30000 --exit src tests/*.test.ts", "build": "tsc", - "eslint": "eslint 'src/*.ts' --quiet --fix", + "eslint": "eslint 'src/*.ts'", "prettier:check": "prettier --check . --config .prettierrc", "prettier:fix": "prettier --write . --config .prettierrc", "lint": "yarn eslint && yarn prettier:check" diff --git a/src/index.ts b/src/index.ts index 398dacc..8c3ad91 100644 --- a/src/index.ts +++ b/src/index.ts @@ -122,6 +122,7 @@ export class GasPriceOracle { params: [{ data: callData, to: contract }, 'latest'], }; try { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const response = await axios.post(rpcUrl!, body, { timeout: this.configuration.timeout }); if (response.status === 200) { const { result } = response.data; @@ -174,19 +175,19 @@ export class GasPriceOracle { return this.lastGasPrice; } - addOffChainOracle(oracle: OffChainOracle) { + addOffChainOracle(oracle: OffChainOracle): void { this.offChainOracles[oracle.name] = oracle; } - addOnChainOracle(oracle: OnChainOracle) { + addOnChainOracle(oracle: OnChainOracle): void { this.onChainOracles[oracle.name] = oracle; } - removeOnChainOracle(name: string) { + removeOnChainOracle(name: string): void { delete this.onChainOracles[name]; } - removeOffChainOracle(name: string) { + removeOffChainOracle(name: string): void { delete this.offChainOracles[name]; } }