Skip to content

chore(lint): clear the repo-wide test-hygiene warnings surfaced by re-enabling eslint - #152

Merged
prisis merged 8 commits into
alphafrom
chore/lint-warnings-sweep
Jul 21, 2026
Merged

chore(lint): clear the repo-wide test-hygiene warnings surfaced by re-enabling eslint#152
prisis merged 8 commits into
alphafrom
chore/lint-warnings-sweep

Conversation

@prisis

@prisis prisis commented Jul 21, 2026

Copy link
Copy Markdown
Member

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) — added expect.assertions(<N>) as the first statement of each test, with the exact executed-expect count. 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 bare vi.fn() mocks from their usage (e.g. vi.fn<(event: ObservabilityEvent) => void>()).
  • vitest/require-top-level-describe (x402) — moved top-level afterEach hooks inside their describe blocks (duplicated into both describes of charge-flow.test.ts so 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-deletedelete 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 deliberate await in an async telemetry hook).

Packages touched

errors, mcp, agent, lunora, browser, queue, testing, react-native, react, workflow, x402, studio, runtime, do, cli.

Verification

  • lint:eslint0 errors, 0 warnings across all 50 projects.
  • test — full suite 48/48 projects green (validates every expect.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 a no-console line-disable on a genuine last-resort diagnostic.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved diagnostic handling when optional capture logging fails, while preserving normal message delivery behavior.

@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for lunorash ready!

Name Link
🔨 Latest commit c74deea
🔍 Latest deploy log https://app.netlify.com/projects/lunorash/deploys/6a5f3f109ea72600089c4ba0
😎 Deploy Preview https://deploy-preview-152--lunorash.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@prisis, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 62b730bc-0db5-460e-8bbc-d619b563b4bd

📥 Commits

Reviewing files that changed from the base of the PR and between 6a08d06 and c74deea.

⛔ Files ignored due to path filters (1)
  • .vis/templates/lunora-package.ts is excluded by !**/.vis/** and included by none
📒 Files selected for processing (50)
  • apps/docs/package.json
  • apps/playground/package.json
  • apps/studio/package.json
  • packages/advisor/package.json
  • packages/agent/package.json
  • packages/ai/package.json
  • packages/angular/package.json
  • packages/astro/package.json
  • packages/auth/package.json
  • packages/bindings/package.json
  • packages/browser/package.json
  • packages/cli/package.json
  • packages/client/package.json
  • packages/cloudflare-access/package.json
  • packages/codegen/package.json
  • packages/config/package.json
  • packages/container/package.json
  • packages/d1/package.json
  • packages/db/package.json
  • packages/dispatch/package.json
  • packages/do/package.json
  • packages/errors/package.json
  • packages/fingerprint/package.json
  • packages/flags/package.json
  • packages/hyperdrive/package.json
  • packages/lunora/package.json
  • packages/mail/package.json
  • packages/mcp/package.json
  • packages/nuxt/package.json
  • packages/payment/package.json
  • packages/queue/package.json
  • packages/ratelimit/package.json
  • packages/react-native/package.json
  • packages/react/package.json
  • packages/replica/package.json
  • packages/runtime/package.json
  • packages/scheduler/package.json
  • packages/seed/package.json
  • packages/server/package.json
  • packages/solid/package.json
  • packages/sql-store/package.json
  • packages/storage/package.json
  • packages/studio/package.json
  • packages/svelte/package.json
  • packages/testing/package.json
  • packages/values/package.json
  • packages/vite/package.json
  • packages/vue/package.json
  • packages/workflow/package.json
  • packages/x402/package.json

Walkthrough

The capture-sink failure warning in dispatchQueueBatch now includes an explicit ESLint suppression and clarifying comment. Dispatch and capture control flow remain unchanged.

Changes

Queue capture diagnostics

Layer / File(s) Summary
Capture warning lint clarification
packages/queue/src/dispatch.ts
The capture failure console.warn path is marked as an intentional last-resort diagnostic with an inline no-console suppression.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested labels: package: queue

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: repo-wide ESLint test-hygiene cleanup after re-enabling linting.
Description check ✅ Passed The description covers the why, scope, affected packages, and verification, though it omits some template sections like linked issues and checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/lint-warnings-sweep

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for confirming the Contributor License Agreement! 🙏

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit c74deea.

@codspeed-hq

codspeed-hq Bot commented Jul 21, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 16.75%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 159 untouched benchmarks
⏩ 1 skipped benchmark1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

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

Open in CodSpeed

Footnotes

  1. 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.

  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment