From d22757830907c21eed3585866fc4a8dbb7134231 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 31 Aug 2023 22:16:11 +0000 Subject: [PATCH] lint:fix --- src/classes.ts | 4 ++-- src/errors.ts | 8 +++++--- src/utils.ts | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/classes.ts b/src/classes.ts index b5159dc..624dd8f 100644 --- a/src/classes.ts +++ b/src/classes.ts @@ -1,8 +1,8 @@ -import { - isPlainObject, +import type { Json, JsonRpcError as SerializedJsonRpcError, } from '@metamask/utils'; +import { isPlainObject } from '@metamask/utils'; import safeStringify from 'fast-safe-stringify'; import type { OptionalDataWithOptionalCause } from './utils'; diff --git a/src/errors.ts b/src/errors.ts index 6f963c3..632a935 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,6 +1,7 @@ import { JsonRpcError, EthereumProviderError } from './classes'; import { errorCodes } from './error-constants'; -import { OptionalDataWithOptionalCause, getMessageFromCode } from './utils'; +import type { OptionalDataWithOptionalCause } from './utils'; +import { getMessageFromCode } from './utils'; type EthereumErrorOptions = { message?: string; @@ -25,8 +26,9 @@ export const rpcErrors = { * @param arg - The error message or options bag. * @returns An instance of the {@link JsonRpcError} class. */ - parse: (arg?: JsonRpcErrorsArg) => - getJsonRpcError(errorCodes.rpc.parse, arg), + parse: ( + arg?: JsonRpcErrorsArg, + ) => getJsonRpcError(errorCodes.rpc.parse, arg), /** * Get a JSON RPC 2.0 Invalid Request (-32600) error. diff --git a/src/utils.ts b/src/utils.ts index fb613a3..e3328a7 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,11 +1,13 @@ +import type { + Json, + JsonRpcError as SerializedJsonRpcError, + RuntimeObject, +} from '@metamask/utils'; import { hasProperty, isValidJson, isObject, isJsonRpcError, - Json, - JsonRpcError as SerializedJsonRpcError, - RuntimeObject, } from '@metamask/utils'; import { errorCodes, errorValues } from './error-constants';