From 65f6a7ac986171d0a3e5e1d994819fa42eb09d55 Mon Sep 17 00:00:00 2001 From: Neil Campbell Date: Thu, 31 Aug 2023 09:59:39 +0800 Subject: [PATCH] style: fix lint warnings (#122) Fixing some lint warnings Trigger a major version bump for the previous merged PR chore: adding peer dependency with algosdk #107 BREAKING CHANGES: The previous merged PR (commit 80d501f) introduced some breaking changes, however semantic release didn't detect as a breaking change, as the commit wasn't formatted correctly. --- ...ient_with_retry.AlgoHttpClientWithRetry.md | 2 +- ...enBaseHTTPClient.URLTokenBaseHTTPClient.md | 22 +++++++++---------- .../modules/types_urlTokenBaseHTTPClient.md | 2 +- src/transaction.ts | 2 +- src/types/urlTokenBaseHTTPClient.ts | 13 +++++++++-- 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/docs/code/classes/types_algo_http_client_with_retry.AlgoHttpClientWithRetry.md b/docs/code/classes/types_algo_http_client_with_retry.AlgoHttpClientWithRetry.md index 0abf0a1e..ef1baa49 100644 --- a/docs/code/classes/types_algo_http_client_with_retry.AlgoHttpClientWithRetry.md +++ b/docs/code/classes/types_algo_http_client_with_retry.AlgoHttpClientWithRetry.md @@ -53,7 +53,7 @@ A HTTP Client that wraps the Algorand SDK HTTP Client with retries #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:45](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L45) +[src/types/urlTokenBaseHTTPClient.ts:48](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L48) ## Properties diff --git a/docs/code/classes/types_urlTokenBaseHTTPClient.URLTokenBaseHTTPClient.md b/docs/code/classes/types_urlTokenBaseHTTPClient.URLTokenBaseHTTPClient.md index 156951e7..9271d7b2 100644 --- a/docs/code/classes/types_urlTokenBaseHTTPClient.URLTokenBaseHTTPClient.md +++ b/docs/code/classes/types_urlTokenBaseHTTPClient.URLTokenBaseHTTPClient.md @@ -57,7 +57,7 @@ This is the default implementation of BaseHTTPClient. #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:45](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L45) +[src/types/urlTokenBaseHTTPClient.ts:48](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L48) ## Properties @@ -67,7 +67,7 @@ This is the default implementation of BaseHTTPClient. #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:41](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L41) +[src/types/urlTokenBaseHTTPClient.ts:44](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L44) ___ @@ -77,7 +77,7 @@ ___ #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:45](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L45) +[src/types/urlTokenBaseHTTPClient.ts:53](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L53) ___ @@ -87,7 +87,7 @@ ___ #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:42](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L42) +[src/types/urlTokenBaseHTTPClient.ts:45](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L45) ## Methods @@ -114,7 +114,7 @@ BaseHTTPClient.delete #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:176](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L176) +[src/types/urlTokenBaseHTTPClient.ts:185](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L185) ___ @@ -140,7 +140,7 @@ BaseHTTPClient.get #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:137](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L137) +[src/types/urlTokenBaseHTTPClient.ts:146](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L146) ___ @@ -165,7 +165,7 @@ A URL string #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:71](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L71) +[src/types/urlTokenBaseHTTPClient.ts:80](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L80) ___ @@ -192,7 +192,7 @@ BaseHTTPClient.post #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:153](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L153) +[src/types/urlTokenBaseHTTPClient.ts:162](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L162) ___ @@ -212,7 +212,7 @@ ___ #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:97](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L97) +[src/types/urlTokenBaseHTTPClient.ts:106](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L106) ___ @@ -232,7 +232,7 @@ ___ #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:128](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L128) +[src/types/urlTokenBaseHTTPClient.ts:137](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L137) ___ @@ -252,4 +252,4 @@ ___ #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:89](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L89) +[src/types/urlTokenBaseHTTPClient.ts:98](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L98) diff --git a/docs/code/modules/types_urlTokenBaseHTTPClient.md b/docs/code/modules/types_urlTokenBaseHTTPClient.md index 1707e21b..57c01a07 100644 --- a/docs/code/modules/types_urlTokenBaseHTTPClient.md +++ b/docs/code/modules/types_urlTokenBaseHTTPClient.md @@ -27,4 +27,4 @@ #### Defined in -[src/types/urlTokenBaseHTTPClient.ts:33](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L33) +[src/types/urlTokenBaseHTTPClient.ts:36](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L36) diff --git a/src/transaction.ts b/src/transaction.ts index d2c8cebb..3c60e332 100644 --- a/src/transaction.ts +++ b/src/transaction.ts @@ -240,7 +240,7 @@ export const sendAtomicTransactionComposer = async function (atcSend: AtomicTran decodeError: r.decodeError, returnValue: r.returnValue, rawReturnValue: r.rawReturnValue, - } as ABIReturn), + }) as ABIReturn, ), } as SendAtomicTransactionComposerResults // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/src/types/urlTokenBaseHTTPClient.ts b/src/types/urlTokenBaseHTTPClient.ts index f1115f03..549ab4c5 100644 --- a/src/types/urlTokenBaseHTTPClient.ts +++ b/src/types/urlTokenBaseHTTPClient.ts @@ -23,7 +23,10 @@ export interface CustomTokenHeader { } class URLTokenBaseHTTPError extends Error implements BaseHTTPClientError { - constructor(message: string, public response: BaseHTTPClientResponse) { + constructor( + message: string, + public response: BaseHTTPClientResponse, + ) { super(message) this.name = 'URLTokenBaseHTTPError' this.response = response @@ -42,7 +45,13 @@ export class URLTokenBaseHTTPClient implements BaseHTTPClient { private readonly tokenHeader: TokenHeader // eslint-disable-next-line @typescript-eslint/no-explicit-any - constructor(tokenHeader: TokenHeader, baseServer: string, port?: string | number, private defaultHeaders: Record = {}) { + constructor( + tokenHeader: TokenHeader, + baseServer: string, + port?: string | number, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + private defaultHeaders: Record = {}, + ) { // Append a trailing slash so we can use relative paths. Without the trailing // slash, the last path segment will be replaced by the relative path. See // usage in `addressWithPath`.