veza/apps
senke 12a78616df refactor(web): zero out @typescript-eslint/no-unused-vars (134 → 0)
Two-step cleanup of the no-unused-vars warning bucket :

1. Widened the rule's ignore patterns in eslint.config.js so the
   `_`-prefix convention works uniformly across all four contexts
   (function args, local vars, caught errors, destructured arrays).
   The argsIgnorePattern was already `^_` ; added varsIgnorePattern,
   caughtErrorsIgnorePattern, destructuredArrayIgnorePattern with
   the same `^_` regex. Knocked 17 warnings out instantly because the
   codebase had already adopted `_xxx` for unused locals and was
   waiting on this config change.

2. Fixed the remaining 117 cases across 99 files by pattern :
   * 26 catch-binding cases : `catch (e) {…}` → `catch {…}` (TS 4.0+
     optional binding, ES2019). Cleaner than `catch (_e)` for the
     dozen "swallow and toast" error handlers that don't read the
     error.
   * 58 unused imports removed (incl. one literal `electron`
     contextBridge import that crept in from a phantom port-attempt).
   * 28 destructure / assignment cases : prefixed with `_` where the
     name documents the contract (test fixtures, hook return tuples
     where one slot isn't used yet) ; deleted outright when the
     assignment had no side effect and no documentary value.
   * 3 function param cases : prefixed with `_`.
   * 2 self-recursive `requestAnimationFrame` blocks that were dead
     code (an interval-based alternative did the work) : deleted.

`tsc --noEmit` reports 0 errors after the changes. ESLint total
dropped from 1240 to 1108. Updated the baseline in
.github/workflows/ci.yml in the next commit.

Pattern decisions logged inline so future maintainers know that
`_`-prefix isn't slop — it's the documented, lint-aware way to mark
"intentionally unused" without having to remove the name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 23:05:32 +02:00
..
web refactor(web): zero out @typescript-eslint/no-unused-vars (134 → 0) 2026-04-30 23:05:32 +02:00