Skip to content

Oxlint - #2

Merged
RawToast merged 2 commits into
masterfrom
tidy-up
Jun 23, 2026
Merged

Oxlint#2
RawToast merged 2 commits into
masterfrom
tidy-up

Conversation

@RawToast

@RawToast RawToast commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores

    • Added linting configuration to improve code quality standards
    • Updated build and validation scripts to include new linting checks
    • Refined development tooling setup and automation
  • Tests

    • Removed unused test utilities

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@RawToast, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 42 minutes and 19 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 54d7472a-74cd-4acf-9fa5-0697ffa602fd

📥 Commits

Reviewing files that changed from the base of the PR and between d6d27ee and d7f51ff.

📒 Files selected for processing (1)
  • scripts/cursor-sdk-local-agent-bridge.mjs
📝 Walkthrough

Walkthrough

Adds an .oxlintrc.json configuration enabling TypeScript, Unicorn, and Oxc plugins with correctness errors, and updates package.json to include a lint script and oxlint in the check command. The bridge script's Set iteration is simplified, JSDoc comments are added to three declarations, and two unused test helper functions are removed.

Changes

Oxlint integration and code fixes

Layer / File(s) Summary
Oxlint config and package.json scripts
.oxlintrc.json, package.json
Introduces oxlint JSON config with plugin and rule settings; adds a lint script (oxlint --fix) and extends check to run oxlint in parallel alongside compile and oxfmt --check.
Set iteration changes, JSDoc additions, and test helper removals
scripts/cursor-sdk-local-agent-bridge.mjs, worker/__tests__/index.test.ts
captureActiveClientToolCall iterates handlers Set directly instead of via spread copy; Promise.allSettled in rl.on("close") receives the pending Set directly. JSDoc added for agentCache, handleRequest, and readJsonBody. Unused decodeBase64ForTest and sseFrame test helpers deleted.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop hop, the linter's here to play,
Sets now iterated the direct way,
JSDoc blossoms on functions three,
Old test helpers gone, the code runs free,
With oxlint's gaze, the bugs can't stay! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Oxlint' is vague and generic, providing minimal information about the specific changes made. Use a more descriptive title that captures the main objective, such as 'Add oxlint configuration and linting scripts' or 'Introduce OXLint for code quality checks'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tidy-up

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/cursor-sdk-local-agent-bridge.mjs`:
- Around line 425-427: The loop iterating over the handlers Set at line 425 in
captureActiveClientToolCall() is vulnerable to race conditions because handlers
are being removed concurrently by unregisterCapture() called from the finally
block. Direct Set iteration does not create a snapshot and will skip elements
when mutations occur during traversal. Create a snapshot of the handlers Set
before iteration by changing the for loop from for (const handler of handlers)
to for (const handler of [...handlers]) or for (const handler of
Array.from(handlers)) to safely iterate over a stable copy.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c5df8876-9c9e-4300-bfbc-2187a98151be

📥 Commits

Reviewing files that changed from the base of the PR and between 43a0a92 and d6d27ee.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .oxlintrc.json
  • package.json
  • scripts/cursor-sdk-local-agent-bridge.mjs
  • worker/__tests__/index.test.ts
💤 Files with no reviewable changes (1)
  • worker/tests/index.test.ts

Comment thread scripts/cursor-sdk-local-agent-bridge.mjs Outdated
@RawToast
RawToast merged commit 00d036a into master Jun 23, 2026
2 checks passed
@RawToast
RawToast deleted the tidy-up branch June 23, 2026 01:03
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