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
+3 -5
View File
@@ -8,7 +8,7 @@ const _origConsoleError = console.error
const _errorTimestamps = new Map<string, number>()
const DEDUP_WINDOW_MS = 150
console.error = function(...args: unknown[]) {
console.error = function (...args: unknown[]) {
if (args.length > 0 && typeof args[0] === 'string') {
const msg = args[0]
const stack = new Error().stack || ''
@@ -40,9 +40,7 @@ console.error = function(...args: unknown[]) {
const maskedJid = jid && jid.length > 8 ? `${jid.substring(0, 4)}****${jid.substring(jid.length - 4)}` : jid
// Format clean message
const cleanMsg = maskedJid
? `${errorType} | JID: ${maskedJid}`
: errorType
const cleanMsg = maskedJid ? `${errorType} | JID: ${maskedJid}` : errorType
// Deduplication key: type + ORIGINAL JID (use unmasked to prevent collisions)
const dedupeKey = `${errorType}:${jid || 'unknown'}`
@@ -50,7 +48,7 @@ console.error = function(...args: unknown[]) {
const lastTime = _errorTimestamps.get(dedupeKey)
if (lastTime && now - lastTime < DEDUP_WINDOW_MS) {
return // Skip duplicate within 150ms window
return // Skip duplicate within 150ms window
}
_errorTimestamps.set(dedupeKey, now)