From d0bbf85e6a2069af933f12495cb2fa5906d4d7a4 Mon Sep 17 00:00:00 2001 From: Renato Alcara Date: Sun, 26 Apr 2026 23:53:55 -0300 Subject: [PATCH] fix(lint): resolve no-unused-vars errors flagged by CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - bounded-retry.ts:103 — drop unused generic parameter from BoundedRetryOptions interface (and its single use at line 220). The generic served no purpose: the caller's return type is inferred from the operation function, not from the options. - retry-utils.test.ts:5 — remove `beforeEach` from imports. It was only used by the RetryManager describe block, removed in commit 0f2402da58. Build clean, 58 tests pass (12 bounded-retry + 46 retry-utils). --- src/Utils/bounded-retry.ts | 4 ++-- src/__tests__/Utils/retry-utils.test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Utils/bounded-retry.ts b/src/Utils/bounded-retry.ts index a61d09cf..90269dcb 100644 --- a/src/Utils/bounded-retry.ts +++ b/src/Utils/bounded-retry.ts @@ -100,7 +100,7 @@ export const DEFAULT_TTL_MS = 10 * 60 * 1000 */ export const DEFAULT_PER_ATTEMPT_TIMEOUT_MS = 30000 -export interface BoundedRetryOptions { +export interface BoundedRetryOptions { /** Operation name for logging/metrics */ name?: string /** Sequence of delays (ms). Last value is used as cap. */ @@ -217,7 +217,7 @@ function sleep(ms: number, signal?: AbortSignal): Promise { */ export async function withBoundedRetry( operation: () => Promise, - options: BoundedRetryOptions = {} + options: BoundedRetryOptions = {} ): Promise { const name = options.name ?? 'bounded-retry' const delays = options.delays ?? WHATSAPP_BACKOFF_DELAYS diff --git a/src/__tests__/Utils/retry-utils.test.ts b/src/__tests__/Utils/retry-utils.test.ts index c06482cf..3fad8824 100644 --- a/src/__tests__/Utils/retry-utils.test.ts +++ b/src/__tests__/Utils/retry-utils.test.ts @@ -2,7 +2,7 @@ * Testes unitários para retry-utils.ts */ -import { beforeEach, describe, expect, it, jest } from '@jest/globals' +import { describe, expect, it, jest } from '@jest/globals' import { calculateDelay, createRetrier,