Fix lint errors: remove unused imports, fix floating promises, clean up eslint directives
- Remove unused eslint-disable directives from multiple files - Fix floating promise in baileys-event-stream.ts by adding void operator - Remove unused import recordMessageRetry from messages-send.ts - Prefix unused variable beforeTime with underscore in test file - Remove incorrect eslint-disable comments that were causing prettier errors Progress: Reduced from 68 to 35 errors. Remaining errors are primarily max-depth issues. https://claude.ai/code/session_015R3U3kiprQiNTTNNt31Sg6
This commit is contained in:
@@ -310,7 +310,7 @@ export class BaileysEventStream extends EventEmitter {
|
||||
|
||||
// Process if not paused
|
||||
if (!this.paused && !this.isProcessing) {
|
||||
this.processNext()
|
||||
void this.processNext()
|
||||
}
|
||||
|
||||
return true
|
||||
@@ -598,7 +598,7 @@ export class BaileysEventStream extends EventEmitter {
|
||||
resume(): void {
|
||||
this.paused = false
|
||||
this.emit('resume')
|
||||
this.processNext()
|
||||
void this.processNext()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable max-depth, @typescript-eslint/no-unused-vars */
|
||||
/**
|
||||
* Smart Cache System
|
||||
*
|
||||
|
||||
@@ -216,7 +216,7 @@ export const decodeSyncdMutations = async (
|
||||
// if it's a syncdmutation, get the operation property
|
||||
// otherwise, if it's only a record -- it'll be a SET mutation
|
||||
const operation = 'operation' in msgMutation ? msgMutation.operation : proto.SyncdMutation.SyncdOperation.SET
|
||||
// eslint-disable-next-line eqeqeq
|
||||
|
||||
if (operation == null) {
|
||||
throw new Boom('Missing operation in mutation', { statusCode: 500 })
|
||||
}
|
||||
@@ -343,7 +343,7 @@ export const decodeSyncdPatch = async (
|
||||
}
|
||||
|
||||
const msgVersion = msg.version?.version
|
||||
// eslint-disable-next-line eqeqeq
|
||||
|
||||
if (msgVersion == null) {
|
||||
throw new Boom('Missing version in patch message', { statusCode: 500 })
|
||||
}
|
||||
@@ -446,7 +446,7 @@ export const decodeSyncdSnapshot = async (
|
||||
const newState = newLTHashState()
|
||||
|
||||
const snapshotVersion = snapshot.version?.version
|
||||
// eslint-disable-next-line eqeqeq
|
||||
|
||||
if (snapshotVersion == null) {
|
||||
throw new Boom('Missing version in snapshot', { statusCode: 500 })
|
||||
}
|
||||
@@ -540,7 +540,6 @@ export const decodePatches = async (
|
||||
|
||||
const ver = version?.version
|
||||
if (ver == null) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
throw new Boom('Missing version in patch', { statusCode: 500 })
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable max-depth */
|
||||
/**
|
||||
* Circuit Breaker Pattern Implementation
|
||||
*
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable space-before-function-paren */
|
||||
import { Boom } from '@hapi/boom'
|
||||
import { proto } from '../../WAProto/index.js'
|
||||
import type { WAMessage, WAMessageKey } from '../Types'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable max-depth, @typescript-eslint/no-unused-vars */
|
||||
/**
|
||||
* Prometheus Metrics Exposition - Enterprise Grade
|
||||
*
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable prefer-const */
|
||||
/**
|
||||
* Smart Retry Logic
|
||||
*
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable prefer-const, space-before-function-paren */
|
||||
import { Boom } from '@hapi/boom'
|
||||
import { createHash } from 'crypto'
|
||||
import { zipSync } from 'fflate'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
/**
|
||||
* Structured Logging System for InfiniteAPI
|
||||
*
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-floating-promises, space-before-function-paren */
|
||||
/**
|
||||
* Request Tracing Context
|
||||
*
|
||||
@@ -320,7 +319,7 @@ export function setSpanError(span: Span, error: Error): void {
|
||||
span.attributes.error = true
|
||||
span.attributes.errorMessage = error.message
|
||||
span.attributes.errorName = error.name
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
|
||||
if (error.stack) {
|
||||
span.attributes.errorStack = error.stack
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable max-depth */
|
||||
/**
|
||||
* Unified Session Telemetry Implementation
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user