Skip to content

Commit 76b991c

Browse files
committed
fix: resolve ESLint errors in performance modules
- Replace 'any' types with proper type annotations - Mark unused parameters with underscore prefix - Fix function type definitions to avoid TypeScript/ESLint conflicts 🤖 Generated with Claude Code (claude.ai/code)
1 parent 213e2b0 commit 76b991c

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

packages/indexer-common/src/performance/circuit-breaker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export class CircuitBreaker {
254254
/**
255255
* Create a wrapped function with circuit breaker protection
256256
*/
257-
wrap<T extends (...args: any[]) => Promise<any>>(
257+
wrap<T extends (...args: never[]) => Promise<unknown>>(
258258
fn: T,
259259
fallback?: (...args: Parameters<T>) => ReturnType<T> | Promise<Awaited<ReturnType<T>>>,
260260
): T {

packages/indexer-common/src/performance/concurrent-reconciler.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,9 @@ export class ConcurrentReconciler {
290290
*/
291291
private async reconcileDeploymentInternal(
292292
deployment: SubgraphDeploymentID,
293-
activeAllocations: Allocation[],
294-
network: Network,
295-
operator: Operator,
293+
_activeAllocations: Allocation[],
294+
_network: Network,
295+
_operator: Operator,
296296
): Promise<void> {
297297
// Implementation would include actual reconciliation logic
298298
// This is a placeholder for the core logic
@@ -336,11 +336,11 @@ export class ConcurrentReconciler {
336336
*/
337337
private async processAllocationDecision(
338338
decision: AllocationDecision,
339-
activeAllocations: Allocation[],
340-
epoch: number,
341-
maxAllocationEpochs: number,
342-
network: Network,
343-
operator: Operator,
339+
_activeAllocations: Allocation[],
340+
_epoch: number,
341+
_maxAllocationEpochs: number,
342+
_network: Network,
343+
_operator: Operator,
344344
): Promise<void> {
345345
const startTime = Date.now()
346346

@@ -416,13 +416,13 @@ export class ConcurrentReconciler {
416416
/**
417417
* Get reconciliation metrics
418418
*/
419-
getMetrics(): Readonly<ReconciliationMetrics> {
419+
getMetrics(): Readonly<ReconciliationMetrics & { cacheHitRate: number; circuitBreakerState: string; queueSize: number }> {
420420
return {
421421
...this.metrics,
422422
cacheHitRate: this.cache?.getHitRate() || 0,
423423
circuitBreakerState: this.circuitBreaker?.getState() || 'N/A',
424424
queueSize: this.priorityQueue?.size() || 0,
425-
} as any
425+
}
426426
}
427427

428428
/**

packages/indexer-common/src/performance/network-cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface CacheMetrics {
2323
* High-performance caching layer for network data with TTL and LRU eviction
2424
*/
2525
export class NetworkDataCache {
26-
private cache = new Map<string, CachedEntry<any>>()
26+
private cache = new Map<string, CachedEntry<unknown>>()
2727
private readonly ttl: number
2828
private readonly maxSize: number
2929
private readonly enableMetrics: boolean

0 commit comments

Comments
 (0)