Skip to content

Fix unused vars#1627

Merged
KyleAMathews merged 1 commit into
TanStack:mainfrom
Jaime02:patch-2
Jun 30, 2026
Merged

Fix unused vars#1627
KyleAMathews merged 1 commit into
TanStack:mainfrom
Jaime02:patch-2

Conversation

@Jaime02

@Jaime02 Jaime02 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fix CI. Unused vars should use underscore prefix or have an // eslint-disable-next-line @typescript-eslint/no-unused-vars

Summary by CodeRabbit

  • Tests
    • Updated a type-level test to better verify that omitting an optional field through destructuring does not bring that field back into the resulting type.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

In a type-level test, the destructured nickname binding was renamed to _nickname and the inferred result variable was renamed from result to _result. The HasNickname conditional type check was updated to reference _result.trimmed.

Changes

Type test variable rename

Layer / File(s) Summary
Select type test unused variable fix
packages/db/tests/query/select.test-d.ts
Destructuring renamed to nickname: _nickname and result variable to _result; HasNickname check updated to use _result.trimmed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A nickname hidden, a result tucked away,
With underscores leading, lint warnings at bay,
The type stays the same, no nickname in sight,
A tiny rename to keep everything right.
🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is too brief and omits the required Changes, Checklist, and Release Impact sections from the repository template. Add the template sections with a brief change summary, test status, and release impact/changelog note or mark it as docs/CI/dev-only.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the change, which fixes unused-variable handling in a type-level test.
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

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.

@pkg-pr-new

pkg-pr-new Bot commented Jun 30, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-db

npm i https://pkg.pr.new/@tanstack/angular-db@1627

@tanstack/browser-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/browser-db-sqlite-persistence@1627

@tanstack/capacitor-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/capacitor-db-sqlite-persistence@1627

@tanstack/cloudflare-durable-objects-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/cloudflare-durable-objects-db-sqlite-persistence@1627

@tanstack/db

npm i https://pkg.pr.new/@tanstack/db@1627

@tanstack/db-ivm

npm i https://pkg.pr.new/@tanstack/db-ivm@1627

@tanstack/db-sqlite-persistence-core

npm i https://pkg.pr.new/@tanstack/db-sqlite-persistence-core@1627

@tanstack/electric-db-collection

npm i https://pkg.pr.new/@tanstack/electric-db-collection@1627

@tanstack/electron-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/electron-db-sqlite-persistence@1627

@tanstack/expo-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/expo-db-sqlite-persistence@1627

@tanstack/node-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/node-db-sqlite-persistence@1627

@tanstack/offline-transactions

npm i https://pkg.pr.new/@tanstack/offline-transactions@1627

@tanstack/powersync-db-collection

npm i https://pkg.pr.new/@tanstack/powersync-db-collection@1627

@tanstack/query-db-collection

npm i https://pkg.pr.new/@tanstack/query-db-collection@1627

@tanstack/react-db

npm i https://pkg.pr.new/@tanstack/react-db@1627

@tanstack/react-native-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/react-native-db-sqlite-persistence@1627

@tanstack/rxdb-db-collection

npm i https://pkg.pr.new/@tanstack/rxdb-db-collection@1627

@tanstack/solid-db

npm i https://pkg.pr.new/@tanstack/solid-db@1627

@tanstack/svelte-db

npm i https://pkg.pr.new/@tanstack/svelte-db@1627

@tanstack/tauri-db-sqlite-persistence

npm i https://pkg.pr.new/@tanstack/tauri-db-sqlite-persistence@1627

@tanstack/trailbase-db-collection

npm i https://pkg.pr.new/@tanstack/trailbase-db-collection@1627

@tanstack/vue-db

npm i https://pkg.pr.new/@tanstack/vue-db@1627

commit: 962d851

@KyleAMathews KyleAMathews left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@KyleAMathews KyleAMathews merged commit 7ce457e into TanStack:main Jun 30, 2026
11 checks passed
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