Skip to content

Eliminate all CI lint and test warnings#106

Merged
gilgold merged 1 commit into
mainfrom
fix/ci-warnings
Jun 10, 2026
Merged

Eliminate all CI lint and test warnings#106
gilgold merged 1 commit into
mainfrom
fix/ci-warnings

Conversation

@gilgold

@gilgold gilgold commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

CI was emitting ~300 ESLint warnings and ~60 console warnings during the Jest run. This PR brings both to zero with no production behavior changes.

Lint (302 → 0)

  • Removed unused imports, dead variables, and write-only counters (verified by grep before each removal; side-effecting calls kept, only assignments dropped)
  • Unused catch params → optional catch binding; dead DEBUG_STORAGE blocks deleted
  • Escaped literal quotes in JSX, added missing display names, removed useless regex escapes
  • Enabled react/jsx-uses-vars in the test-files ESLint block — 108 of the warnings were false positives where ESLint couldn't see imports used as JSX in tests

Test output (~60 → 0)

  • Fixed React act(...) warnings in 6 component suites by awaiting async storage reads and lazy-loaded modals inside act() — no assertions changed
  • Tests that deliberately exercise warning paths (backup-size fallbacks, orphan/ghost pruning, sync safety blocks, URL sanitization) now spy on console.warn/console.error and assert the warning fired where meaningful; no global silencer was added

Verification

  • yarn lint — clean, zero warnings
  • yarn test — 126 suites, 950 tests pass; zero console.warn/console.error, zero act() warnings
  • yarn prod — compiles successfully

🤖 Generated with Claude Code

Lint (302 warnings -> 0):
- Remove unused imports, dead variables and write-only counters
- Use optional catch bindings for unused catch params
- Escape literal quotes in JSX text, add missing display names
- Remove dead DEBUG_STORAGE blocks and useless regex escapes
- Enable react/jsx-uses-vars for test files so JSX usage counts
  (previously 108 false-positive no-unused-vars in tests)

Test output (~60 console messages -> 0):
- Wrap async storage/lazy-load updates in act() across six
  component test suites (FPContentArea, CollectionListItem,
  CollectionDetailPanel, SyncDebugRecoveryPanel,
  CollectionListOptions, MoveToCollectionModal)
- Spy on console.warn/error in tests that deliberately exercise
  warning paths, asserting the warning fired where meaningful

No production behavior changes; 950 tests pass, yarn prod builds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gilgold gilgold merged commit 78bb939 into main Jun 10, 2026
3 checks passed
@gilgold gilgold deleted the fix/ci-warnings branch June 10, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant