Skip to content

fix(ci): fix eslint error#432

Merged
AlemTuzlak merged 3 commits into
mainfrom
fix-ci
May 11, 2026
Merged

fix(ci): fix eslint error#432
AlemTuzlak merged 3 commits into
mainfrom
fix-ci

Conversation

@harry-whorlow
Copy link
Copy Markdown
Collaborator

@harry-whorlow harry-whorlow commented May 11, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Ensured console piping fallback uses the correct original console method, addressing an ESLint “unnecessary condition” warning.
  • Tests

    • Added tests to validate console piping behavior and proper fallback to the original pre-wrapped console.
  • Chores

    • Added a patch release changeset for the devtools-vite package.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@autofix-ci[bot] has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 46 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2bf7fc26-a026-4581-9226-965fd1495ec5

📥 Commits

Reviewing files that changed from the base of the PR and between d0b791a and d434735.

📒 Files selected for processing (2)
  • packages/devtools-vite/src/plugin.ts
  • packages/devtools-vite/tests/index.test.ts
📝 Walkthrough

Walkthrough

This PR refines console-pipe typings to a Partial record, updates per-entry log selection to use nullish coalescing fallbacks, adds tests that capture pre-wrapped console methods, and adds a changeset documenting a patch release.

Changes

Console Method Lookup ESLint Fix

Layer / File(s) Summary
Type Refinement
packages/devtools-vite/src/plugin.ts
originalConsole type changes from Record<ConsoleLevel, (...args: any[]) => void> to Partial<Record<ConsoleLevel, (...args: any[]) => void>>.
Method Selection Logic
packages/devtools-vite/src/plugin.ts
Log method lookup now uses nullish coalescing: originalConsole[entry.level] ?? originalConsole.log (with non-null assertion where used).
Tests / Mocks
packages/devtools-vite/tests/index.test.ts
Adds Vitest mock capturing handlers.onConsolePipe and a configureServer test that ensures the piped log uses the original pre-wrap console.log and falls back correctly for unknown levels.
Release Documentation
.changeset/fix-eslint-unnecessary-condition.md
Adds a changeset patch entry describing the ESLint unnecessary-condition fix in the console pipe log method lookup.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I’m a rabbit in the code so spry,
I hop where nullish coalescing lies,
I tuck old logs beneath my paw,
And whisper types to keep the law —
ESLint nods, the tests reply. 🐇✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is completely missing; it contains no information about the changes made, their motivation, or whether required checklist items were addressed. Add a comprehensive description explaining the ESLint error, the fix applied, and complete the required checklist items including confirmation of local testing and changeset creation.
Title check ❓ Inconclusive The title 'fix(ci): fix eslint error' is vague and does not clearly describe the actual change, which is fixing an ESLint unnecessary condition error in the devtools-vite plugin's console piping logic. Revise the title to be more specific about the change, such as 'fix: resolve ESLint unnecessary condition error in devtools-vite console piping' or 'fix: use nullish coalescing for console.log fallback'.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 fix-ci

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 and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 11, 2026

View your CI Pipeline Execution ↗ for commit 0ed6ecb

Command Status Duration Result
nx affected --targets=test:eslint,test:sherif,t... ✅ Succeeded 12s View ↗
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-11 20:05:51 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

🚀 Changeset Version Preview

3 package(s) bumped directly, 11 bumped as dependents.

🟨 Minor bumps

Package Version Reason
@tanstack/devtools-utils 0.4.0 → 0.5.0 Changeset

🟩 Patch bumps

Package Version Reason
@tanstack/devtools-ui 0.5.1 → 0.5.2 Changeset
@tanstack/devtools-vite 0.6.0 → 0.6.1 Changeset
@tanstack/angular-devtools 0.0.3 → 0.0.4 Dependent
@tanstack/devtools 0.12.1 → 0.12.2 Dependent
@tanstack/devtools-a11y 0.1.2 → 0.1.3 Dependent
@tanstack/devtools-example-angular-a11y-devtools 0.0.2 → 0.0.3 Dependent
@tanstack/devtools-example-angular-basic 0.0.2 → 0.0.3 Dependent
@tanstack/devtools-example-angular-panel 0.0.2 → 0.0.3 Dependent
@tanstack/devtools-example-angular-with-devtools 0.0.2 → 0.0.3 Dependent
@tanstack/preact-devtools 0.10.4 → 0.10.5 Dependent
@tanstack/react-devtools 0.10.4 → 0.10.5 Dependent
@tanstack/solid-devtools 0.8.4 → 0.8.5 Dependent
@tanstack/vue-devtools 0.2.18 → 0.2.19 Dependent

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 11, 2026

More templates

@tanstack/angular-devtools

npm i https://pkg.pr.new/@tanstack/angular-devtools@432

@tanstack/devtools

npm i https://pkg.pr.new/@tanstack/devtools@432

@tanstack/devtools-a11y

npm i https://pkg.pr.new/@tanstack/devtools-a11y@432

@tanstack/devtools-client

npm i https://pkg.pr.new/@tanstack/devtools-client@432

@tanstack/devtools-ui

npm i https://pkg.pr.new/@tanstack/devtools-ui@432

@tanstack/devtools-utils

npm i https://pkg.pr.new/@tanstack/devtools-utils@432

@tanstack/devtools-vite

npm i https://pkg.pr.new/@tanstack/devtools-vite@432

@tanstack/devtools-event-bus

npm i https://pkg.pr.new/@tanstack/devtools-event-bus@432

@tanstack/devtools-event-client

npm i https://pkg.pr.new/@tanstack/devtools-event-client@432

@tanstack/preact-devtools

npm i https://pkg.pr.new/@tanstack/preact-devtools@432

@tanstack/react-devtools

npm i https://pkg.pr.new/@tanstack/react-devtools@432

@tanstack/solid-devtools

npm i https://pkg.pr.new/@tanstack/solid-devtools@432

@tanstack/vue-devtools

npm i https://pkg.pr.new/@tanstack/vue-devtools@432

commit: d434735

@harry-whorlow harry-whorlow marked this pull request as draft May 11, 2026 15:29
@harry-whorlow harry-whorlow marked this pull request as ready for review May 11, 2026 19:53
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 `@packages/devtools-vite/tests/index.test.ts`:
- Around line 374-396: The tests for capturedOnConsolePipe can get false
positives because beforeWrapSpy/afterWrapSpy carry calls from setup; before
invoking capturedOnConsolePipe in both "known level" and "unknown level" iters,
clear the spies' call history (e.g., call beforeWrapSpy.mockClear() and
afterWrapSpy.mockClear() or use jest.clearAllMocks()) so the subsequent
expect(beforeWrapSpy).toHaveBeenCalled() /
expect(afterWrapSpy).not.toHaveBeenCalled() assert only the calls produced by
the capturedOnConsolePipe invocation; apply this change in the two tests that
reference capturedOnConsolePipe, before the capturedOnConsolePipe!(...) call.
🪄 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: 3f6ebba4-2cbd-4ca3-aeb3-2c5c97bb5851

📥 Commits

Reviewing files that changed from the base of the PR and between 30d589c and 0ed6ecb.

📒 Files selected for processing (2)
  • packages/devtools-vite/src/plugin.ts
  • packages/devtools-vite/tests/index.test.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/devtools-vite/src/plugin.ts

Comment thread packages/devtools-vite/tests/index.test.ts
@AlemTuzlak AlemTuzlak merged commit 562ad00 into main May 11, 2026
7 checks passed
@AlemTuzlak AlemTuzlak deleted the fix-ci branch May 11, 2026 20:27
@github-actions github-actions Bot mentioned this pull request May 11, 2026
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.

2 participants