Skip to content

test(svelte-query-persist-client): remove unused 'svelte-ignore' directives from test components#10531

Merged
sukvvon merged 1 commit intomainfrom
test/svelte-query-persist-client-remove-unused-svelte-ignore
Apr 20, 2026
Merged

test(svelte-query-persist-client): remove unused 'svelte-ignore' directives from test components#10531
sukvvon merged 1 commit intomainfrom
test/svelte-query-persist-client-remove-unused-svelte-ignore

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 20, 2026

🎯 Changes

Removes // svelte-ignore state_snapshot_uncloneable directives from four test components in svelte-query-persist-client/tests/. These directives no longer suppress any warning — the referenced state_snapshot_uncloneable warning is not triggered by the current code, so svelte/no-unused-svelte-ignore flags them as errors when the tests/ directory is linted.

Files

  • tests/FreshData/FreshData.svelte
  • tests/InitialData/InitialData.svelte
  • tests/RestoreCache/RestoreCache.svelte
  • tests/UseQueries/UseQueries.svelte

Why this PR exists

These files live in tests/, which is currently outside the test:eslint script scope (scoped to ./src only). That's why these dead suppressions have been sitting there unnoticed.

This PR lands first as a prerequisite for a follow-up PR that widens the lint scope to include ./tests for both svelte-query and svelte-query-persist-client.

Verification

  • pnpm exec eslint ./tests on the package: 0 errors, 0 warnings
  • pnpm run test:lib: 7 tests pass, no state_snapshot_uncloneable warnings emitted at runtime (confirming the directives were genuinely dead)

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Chores
    • Cleaned up compiler directives from test files to improve code maintainability.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a1b80fb4-9bd9-44b3-86ef-dd8d7d775aef

📥 Commits

Reviewing files that changed from the base of the PR and between 6b6667e and f0a47b9.

📒 Files selected for processing (4)
  • packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte
  • packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte
  • packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte
  • packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte
💤 Files with no reviewable changes (4)
  • packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte
  • packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte
  • packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte
  • packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte

📝 Walkthrough

Walkthrough

Four test files in the svelte-query-persist-client package have been updated to remove a Svelte compiler suppression directive (// svelte-ignore state_snapshot_uncloneable) from their $effect blocks that snapshot query state.

Changes

Cohort / File(s) Summary
Compiler Directive Removal
packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte, packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte, packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte, packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte
Removed // svelte-ignore state_snapshot_uncloneable comments from $effect blocks that capture and push query state snapshots. No logic or behavior changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~1 minute

Poem

🐰✨ A directive removed with a flick of the paw,
No warnings, no suppressions—just code without flaw,
Four test files cleaned, now they sing clear and bright,
The snapshot flows freely, unshackled by sight!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing unused svelte-ignore directives from test components in svelte-query-persist-client.
Description check ✅ Passed The description covers all required template sections with comprehensive details: changes explanation, checklist completion, and release impact assessment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 test/svelte-query-persist-client-remove-unused-svelte-ignore

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 20, 2026

View your CI Pipeline Execution ↗ for commit f0a47b9

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 53s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-20 14:28:00 UTC

@sukvvon sukvvon self-assigned this Apr 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 20, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10531

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10531

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10531

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10531

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10531

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10531

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10531

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10531

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10531

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10531

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10531

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10531

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10531

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10531

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10531

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10531

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10531

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10531

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10531

@tanstack/vue-query-devtools

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

commit: f0a47b9

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.99 KB (0%)
react minimal 9.02 KB (0%)

@sukvvon sukvvon merged commit 0655128 into main Apr 20, 2026
10 checks passed
@sukvvon sukvvon deleted the test/svelte-query-persist-client-remove-unused-svelte-ignore branch April 20, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant