eslint - dont be quiet. Fix warnings

This commit is contained in:
Alexey 2020-10-19 16:14:07 +03:00
parent a2a4e67845
commit 9bd9a3b165
2 changed files with 6 additions and 5 deletions

@ -14,7 +14,7 @@
"scripts": { "scripts": {
"test": "mocha -r ts-node/register --timeout 30000 --exit src tests/*.test.ts", "test": "mocha -r ts-node/register --timeout 30000 --exit src tests/*.test.ts",
"build": "tsc", "build": "tsc",
"eslint": "eslint 'src/*.ts' --quiet --fix", "eslint": "eslint 'src/*.ts'",
"prettier:check": "prettier --check . --config .prettierrc", "prettier:check": "prettier --check . --config .prettierrc",
"prettier:fix": "prettier --write . --config .prettierrc", "prettier:fix": "prettier --write . --config .prettierrc",
"lint": "yarn eslint && yarn prettier:check" "lint": "yarn eslint && yarn prettier:check"

@ -122,6 +122,7 @@ export class GasPriceOracle {
params: [{ data: callData, to: contract }, 'latest'], params: [{ data: callData, to: contract }, 'latest'],
}; };
try { try {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const response = await axios.post(rpcUrl!, body, { timeout: this.configuration.timeout }); const response = await axios.post(rpcUrl!, body, { timeout: this.configuration.timeout });
if (response.status === 200) { if (response.status === 200) {
const { result } = response.data; const { result } = response.data;
@ -174,19 +175,19 @@ export class GasPriceOracle {
return this.lastGasPrice; return this.lastGasPrice;
} }
addOffChainOracle(oracle: OffChainOracle) { addOffChainOracle(oracle: OffChainOracle): void {
this.offChainOracles[oracle.name] = oracle; this.offChainOracles[oracle.name] = oracle;
} }
addOnChainOracle(oracle: OnChainOracle) { addOnChainOracle(oracle: OnChainOracle): void {
this.onChainOracles[oracle.name] = oracle; this.onChainOracles[oracle.name] = oracle;
} }
removeOnChainOracle(name: string) { removeOnChainOracle(name: string): void {
delete this.onChainOracles[name]; delete this.onChainOracles[name];
} }
removeOffChainOracle(name: string) { removeOffChainOracle(name: string): void {
delete this.offChainOracles[name]; delete this.offChainOracles[name];
} }
} }