chore(lint): clear the repo-wide test-hygiene warnings surfaced by re-enabling eslint - #152
Conversation
…lint Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197KjhmBDB3PXAc6TXiPqZ9
… eslint Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197KjhmBDB3PXAc6TXiPqZ9
…r eslint Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197KjhmBDB3PXAc6TXiPqZ9
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197KjhmBDB3PXAc6TXiPqZ9
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197KjhmBDB3PXAc6TXiPqZ9
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197KjhmBDB3PXAc6TXiPqZ9
✅ Deploy Preview for lunorash ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for following the naming conventions! 🙏 |
|
Warning Review limit reached
Next review available in: 22 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (50)
WalkthroughThe capture-sink failure warning in ChangesQueue capture diagnostics
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for confirming the Contributor License Agreement! 🙏 |
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Merging this PR will degrade performance by 16.75%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | in-batch: single IN(...) query + id->doc re-projection |
786.1 µs | 944.3 µs | -16.75% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing chore/lint-warnings-sweep (c74deea) with alpha (40fb9d8)2
Footnotes
-
1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩
-
No successful run was found on
alpha(0c7bb66) during the generation of this report, so 40fb9d8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
What & why
Re-enabling ESLint (via the TS6 toolchain pin in #150) surfaced ~184 pre-existing advisory test-hygiene warnings across the repo — the linter had been crashing since the TS7-native migration, so these accumulated unnoticed. They're non-blocking (the eslint gate fails only on errors), but this clears them so the repo lints 0 problems.
Kept as its own PR against
alpha— deliberately not bundled into the observability feature PRs, since it touches 15 unrelated packages' test files.What changed
All in
__tests__/(plus two one-line src touches), by rule:vitest/prefer-expect-assertions(~124) — addedexpect.assertions(<N>)as the first statement of each test, with the exact executed-expectcount.expect.hasAssertions()only where the count is genuinely non-static (expects inside a loop over catalog/registry size). A wrong count fails the test at runtime, so the full suite passing is the correctness proof.vitest/require-mock-type-parameters(~49) — typed the barevi.fn()mocks from their usage (e.g.vi.fn<(event: ObservabilityEvent) => void>()).vitest/require-top-level-describe(x402) — moved top-levelafterEachhooks inside theirdescribeblocks (duplicated into both describes ofcharge-flow.test.tsso cleanup still runs after every test).vitest/require-to-throw-message— added the actual message matcher to.toThrow()(verified the real thrown string in each case).@typescript-eslint/no-dynamic-delete—delete obj[key]→Reflect.deleteProperty(...).require-hook,no-console,promise/no-promise-in-callback,react-you-might-not-need-an-effect/no-pass-data-to-parent— real fixes where sound; a handful of line-disables with--reasons where the rule is a genuine false-positive (hook-test harnesses, a deliberateawaitin an async telemetry hook).Packages touched
errors, mcp, agent, lunora, browser, queue, testing, react-native, react, workflow, x402, studio, runtime, do, cli.
Verification
lint:eslint— 0 errors, 0 warnings across all 50 projects.test— full suite 48/48 projects green (validates everyexpect.assertions(N)count).build:packages— 47/47.Note
No behavioral changes — this is purely test assertions/mocks/hook placement. The one
src/change (packages/queue/src/dispatch.ts) is ano-consoleline-disable on a genuine last-resort diagnostic.🤖 Generated with Claude Code
Summary by CodeRabbit