Skip to content

chore(svelte-query*/package.json): include 'tests' directory in 'test:eslint' scope#10532

Merged
sukvvon merged 1 commit intomainfrom
chore/svelte-query-include-tests-in-eslint-scope
Apr 20, 2026
Merged

chore(svelte-query*/package.json): include 'tests' directory in 'test:eslint' scope#10532
sukvvon merged 1 commit intomainfrom
chore/svelte-query-include-tests-in-eslint-scope

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 20, 2026

🎯 Changes

Widens the test:eslint script scope in svelte-query and svelte-query-persist-client to include the ./tests directory in addition to ./src.

- "test:eslint": "eslint --concurrency=auto ./src",
+ "test:eslint": "eslint --concurrency=auto ./src ./tests",

Why

Both packages keep their test files under tests/ (not src/__tests__/), so the existing ./src-only scope left those files uncovered by lint. This meant repo-wide ESLint rules weren't enforced on a large portion of test code — dead svelte-ignore directives and other issues could accumulate unnoticed (the prerequisite PR #10531 cleaned up the existing instances).

Files

  • packages/svelte-query/package.json
  • packages/svelte-query-persist-client/package.json

svelte-query-devtools is intentionally excluded — it has no tests/ directory.

Verification

After the scope change, both packages lint cleanly (0 errors):

  • @tanstack/svelte-query: 0 errors (1 unrelated cspell warning on "refetched")
  • @tanstack/svelte-query-persist-client: 0 errors, 0 warnings

✅ 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
    • Expanded ESLint coverage to include test files alongside source files across packages.

@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: 72394885-b858-44ea-9aad-8df2f10fc44a

📥 Commits

Reviewing files that changed from the base of the PR and between 0655128 and a02d4c4.

📒 Files selected for processing (2)
  • packages/svelte-query-persist-client/package.json
  • packages/svelte-query/package.json

📝 Walkthrough

Walkthrough

Both package.json files in svelte-query and svelte-query-persist-client packages have been updated to extend the test:eslint script, adding ./tests directory alongside the existing ./src directory for linting scope.

Changes

Cohort / File(s) Summary
ESLint Configuration
packages/svelte-query-persist-client/package.json, packages/svelte-query/package.json
Updated test:eslint script to lint both ./src and ./tests directories instead of only ./src.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop, a skip, a linting spree,
Now tests join src in harmony,
Two packages, one unified way,
Checking code both night and day! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: expanding ESLint scope in svelte-query packages to include the tests directory.
Description check ✅ Passed The description covers all required sections from the template with clear explanations of changes, motivation, verification, and properly completed checklists.
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 chore/svelte-query-include-tests-in-eslint-scope

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

@sukvvon sukvvon self-assigned this Apr 20, 2026
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 20, 2026

View your CI Pipeline Execution ↗ for commit a02d4c4

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

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

@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@10532

@tanstack/eslint-plugin-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: a02d4c4

@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 fc0462b into main Apr 20, 2026
10 checks passed
@sukvvon sukvvon deleted the chore/svelte-query-include-tests-in-eslint-scope branch April 20, 2026 14:55
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