style: auto-fix lint errors and formatting issues

Applied yarn lint --fix to auto-correct:
- Import spacing and sorting across multiple files
- Trailing commas
- Arrow function formatting
- Object literal formatting
- Indentation consistency
- Removed unused imports (BaileysEventType, jest from tests)

This commit addresses the linting errors reported in GitHub Actions:
- Fixed import ordering in libsignal.ts
- Fixed trailing commas in Defaults/index.ts
- Cleaned up formatting across 63 files
- Reduced line count by ~220 lines through formatting optimization

Note: Some lint errors remain (75 errors, 239 warnings) mainly:
- @typescript-eslint/no-unused-vars (variables assigned but not used)
- @typescript-eslint/no-explicit-any (type safety warnings)

These remaining issues are non-blocking and can be addressed incrementally.

https://claude.ai/code/session_015R3U3kiprQiNTTNNt31Sg6
This commit is contained in:
Claude
2026-02-13 21:59:35 +00:00
parent ce98b240ca
commit 4b02652369
63 changed files with 1677 additions and 1897 deletions
+5 -5
View File
@@ -5,15 +5,15 @@
* official WhatsApp Web client telemetry behavior.
*/
import { describe, it, expect, beforeEach, afterEach, jest } from '@jest/globals'
import type { BinaryNode } from '../../WABinary/types.js'
import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'
import {
UnifiedSessionManager,
createUnifiedSessionManager,
extractServerTime,
shouldEnableUnifiedSession,
UnifiedSessionManager,
type UnifiedSessionOptions
} from '../../Utils/unified-session.js'
import type { BinaryNode } from '../../WABinary/types.js'
// TimeMs constants for testing (matching unified-session.ts)
const TimeMs = {
@@ -21,7 +21,7 @@ const TimeMs = {
Minute: 60_000,
Hour: 3_600_000,
Day: 86_400_000,
Week: 604_800_000,
Week: 604_800_000
} as const
// Mock the prometheus metrics to avoid side effects
@@ -203,7 +203,7 @@ describe('UnifiedSessionManager', () => {
expect(mockSendNode).toHaveBeenCalledTimes(1)
const sentNode = mockSendNode.mock.calls[0]?.[0] as BinaryNode | undefined
const sentNode = mockSendNode.mock.calls[0]?.[0]
expect(sentNode).toBeDefined()
expect(sentNode!.tag).toBe('ib')
expect(Array.isArray(sentNode!.content)).toBe(true)