From 2ff883945ef1b550ab1fc083bc5ef23c8231082d Mon Sep 17 00:00:00 2001 From: Adam R <13562139+catenocrypt@users.noreply.github.com> Date: Thu, 5 Nov 2020 23:51:08 +0100 Subject: [PATCH] Lint fix (#4722) Co-authored-by: Catenocrypt --- script/generic/asset-infos.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/script/generic/asset-infos.ts b/script/generic/asset-infos.ts index c89746d04..d819717bc 100644 --- a/script/generic/asset-infos.ts +++ b/script/generic/asset-infos.ts @@ -9,13 +9,13 @@ import { isPathExistsSync } from "./filesystem"; import { arrayDiff } from "./types"; -import { isValidJSON, writeJsonFile } from "../generic/json"; +import { isValidJSON } from "../generic/json"; import { ActionInterface, CheckStepInterface } from "../generic/interface"; import * as bluebird from "bluebird"; const requiredKeys = ["explorer", "name", "website", "short_description"]; -function isAssetInfoHasAllKeys(info: any, path: string): [boolean, string] { +function isAssetInfoHasAllKeys(info: unknown, path: string): [boolean, string] { const infoKeys = Object.keys(info); const hasAllKeys = requiredKeys.every(k => Object.prototype.hasOwnProperty.call(info, k)); @@ -25,10 +25,10 @@ function isAssetInfoHasAllKeys(info: any, path: string): [boolean, string] { } const isKeysCorrentType = - typeof info.explorer === "string" && info.explorer != "" - && typeof info.name === "string" && info.name != "" - && typeof info.website === "string" - && typeof info.short_description === "string"; + typeof info['explorer'] === "string" && info['explorer'] != "" + && typeof info['name'] === "string" && info['name'] != "" + && typeof info['website'] === "string" + && typeof info['short_description'] === "string"; return [isKeysCorrentType, `Check keys '${requiredKeys}' vs. '${infoKeys}'`]; }