Skip to content

chore(preact-query*): enable 'import/order' and 'sort-imports' - #11924

Merged
sukvvon merged 1 commit into
mainfrom
chore/preact-import-order-rules
Oct 8, 2026
Merged

sukvvon merged 1 commit into
mainfrom
chore/preact-import-order-rules

Conversation

@sukvvon

@sukvvon sukvvon commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

🎯 Changes

The preact packages turned off import/order and sort-imports, which the root config enforces for every other package.

  • Remove the two off overrides from the eslint.config.js of preact-query, preact-query-devtools and preact-query-persist-client.
  • Reorder imports with eslint --fix (import order only, no other code changes). The built JS is unchanged; the only build differences are the order of type imports in two .d.cts files and the source maps.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I have followed the AI contribution policy and fully understand the code in this pull request, including any code generated with AI assistance.

🚀 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
    • Standardized import ordering across the Preact Query packages and their tests.
    • Enabled the applicable default or inherited import-order lint rules.

@sukvvon sukvvon self-assigned this Oct 8, 2026
@changeset-bot

changeset-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4a8ad82

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nx-cloud

nx-cloud Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 4a8ad82

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-10-08 01:18:18 UTC

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

1 package(s) bumped directly, 24 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/query-core 5.104.1 → 5.104.2 Changeset
@tanstack/angular-query-experimental 5.104.1 → 5.104.2 Dependent
@tanstack/angular-query-persist-client 5.104.1 → 5.104.2 Dependent
@tanstack/eslint-plugin-query 5.104.1 → 5.104.2 Dependent
@tanstack/lit-query 0.2.26 → 0.2.27 Dependent
@tanstack/preact-query 5.104.1 → 5.104.2 Dependent
@tanstack/preact-query-devtools 5.104.1 → 5.104.2 Dependent
@tanstack/preact-query-persist-client 5.104.1 → 5.104.2 Dependent
@tanstack/query-async-storage-persister 5.104.1 → 5.104.2 Dependent
@tanstack/query-broadcast-client-experimental 5.104.1 → 5.104.2 Dependent
@tanstack/query-devtools 5.104.1 → 5.104.2 Dependent
@tanstack/query-persist-client-core 5.104.1 → 5.104.2 Dependent
@tanstack/query-sync-storage-persister 5.104.1 → 5.104.2 Dependent
@tanstack/react-query 5.104.1 → 5.104.2 Dependent
@tanstack/react-query-devtools 5.104.1 → 5.104.2 Dependent
@tanstack/react-query-next-experimental 5.104.1 → 5.104.2 Dependent
@tanstack/react-query-persist-client 5.104.1 → 5.104.2 Dependent
@tanstack/solid-query 5.104.1 → 5.104.2 Dependent
@tanstack/solid-query-devtools 5.104.1 → 5.104.2 Dependent
@tanstack/solid-query-persist-client 5.104.1 → 5.104.2 Dependent
@tanstack/svelte-query 6.3.1 → 6.3.2 Dependent
@tanstack/svelte-query-devtools 6.3.1 → 6.3.2 Dependent
@tanstack/svelte-query-persist-client 6.3.1 → 6.3.2 Dependent
@tanstack/vue-query 5.104.1 → 5.104.2 Dependent
@tanstack/vue-query-devtools 6.3.1 → 6.3.2 Dependent

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: TanStack/query/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 859949cb-c77d-4ab4-a056-b443bdc293a0
📥 Commits

Reviewing files that changed from the base of the PR and between d169ee8 and 4a8ad82.

📒 Files selected for processing (45)
  • packages/preact-query-devtools/eslint.config.js
  • packages/preact-query-devtools/src/PreactQueryDevtools.tsx
  • packages/preact-query-devtools/src/PreactQueryDevtoolsPanel.tsx
  • packages/preact-query-persist-client/eslint.config.js
  • packages/preact-query-persist-client/src/PersistQueryClientProvider.tsx
  • packages/preact-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx
  • packages/preact-query-persist-client/src/__tests__/testPersistProvider.tsx
  • packages/preact-query-persist-client/src/__tests__/use-queries-with-persist.test.tsx
  • packages/preact-query/eslint.config.js
  • packages/preact-query/src/HydrationBoundary.tsx
  • packages/preact-query/src/QueryClientProvider.tsx
  • packages/preact-query/src/QueryErrorResetBoundary.tsx
  • packages/preact-query/src/__tests__/ErrorBoundary/ErrorBoundary.ts
  • packages/preact-query/src/__tests__/HydrationBoundary.test.tsx
  • packages/preact-query/src/__tests__/QueryClientProvider.test.tsx
  • packages/preact-query/src/__tests__/infiniteQueryOptions.test-d.tsx
  • packages/preact-query/src/__tests__/mutationOptions.test-d.tsx
  • packages/preact-query/src/__tests__/mutationOptions.test.tsx
  • packages/preact-query/src/__tests__/ssr-hydration.test.tsx
  • packages/preact-query/src/__tests__/suspense.test.tsx
  • packages/preact-query/src/__tests__/useInfiniteQuery.test-d.tsx
  • packages/preact-query/src/__tests__/useInfiniteQuery.test.tsx
  • packages/preact-query/src/__tests__/useMutation.test.tsx
  • packages/preact-query/src/__tests__/usePrefetchInfiniteQuery.test.tsx
  • packages/preact-query/src/__tests__/usePrefetchQuery.test.tsx
  • packages/preact-query/src/__tests__/useQueries.test-d.tsx
  • packages/preact-query/src/__tests__/useQueries.test.tsx
  • packages/preact-query/src/__tests__/useQuery.test-d.tsx
  • packages/preact-query/src/__tests__/useQuery.test.tsx
  • packages/preact-query/src/__tests__/useSuspenseInfiniteQuery.test-d.tsx
  • packages/preact-query/src/__tests__/useSuspenseQueries.test-d.tsx
  • packages/preact-query/src/__tests__/useSuspenseQueries.test.tsx
  • packages/preact-query/src/__tests__/useSuspenseQuery.test.tsx
  • packages/preact-query/src/__tests__/utils.tsx
  • packages/preact-query/src/errorBoundaryUtils.ts
  • packages/preact-query/src/useBaseQuery.ts
  • packages/preact-query/src/useInfiniteQuery.ts
  • packages/preact-query/src/useIsFetching.ts
  • packages/preact-query/src/useMutation.ts
  • packages/preact-query/src/useMutationState.ts
  • packages/preact-query/src/useQueries.ts
  • packages/preact-query/src/useQuery.ts
  • packages/preact-query/src/useSuspenseInfiniteQuery.ts
  • packages/preact-query/src/useSuspenseQueries.ts
  • packages/preact-query/src/useSuspenseQuery.ts
💤 Files with no reviewable changes (3)
  • packages/preact-query-persist-client/eslint.config.js
  • packages/preact-query/eslint.config.js
  • packages/preact-query-devtools/eslint.config.js

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The Preact package ESLint configs no longer disable import-order rules. Source and test imports are reordered. HydrationBoundary imports hydrate as a runtime value.

Changes

Preact import ordering

Layer / File(s) Summary
Enable and apply import ordering
packages/preact-query*/eslint.config.js, packages/preact-query/src/*.{ts,tsx}, packages/preact-query-devtools/src/PreactQueryDevtools*.tsx, packages/preact-query-persist-client/src/PersistQueryClientProvider.tsx
The package configs remove overrides that disabled import/order and sort-imports. Preact source imports are reordered, and HydrationBoundary imports hydrate as a runtime value.
Align test import ordering
packages/preact-query/src/__tests__/*, packages/preact-query-persist-client/src/__tests__/*
Test imports are reordered. Imported symbols, test logic, and expectations remain unchanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 4a8ad

This change reorders imports and enables the package import rules; the package lint commands pass, and no runtime behavior changes. No concrete merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 42 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description includes all required sections: changes, checklist, and release impact. It explains the ESLint configuration changes, import reordering, test status, AI policy status, and no-release i…
Title check ✅ Passed The title clearly and concisely identifies the main change: enabling import/order and sort-imports for the Preact Query packages.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 Oct 8, 2026 •

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@11924

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 4a8ad82

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.73 KB (0%)
react minimal 8.58 KB (0%)

@sukvvon
sukvvon force-pushed the chore/preact-import-order-rules branch from dd1d722 to 4a8ad82 Compare October 8, 2026 01:14
@sukvvon sukvvon changed the title chore(preact-query*): enable 'import/order' and 'sort-imports' to match the other packages chore(preact-query*): enable 'import/order' and 'sort-imports' Oct 8, 2026
@sukvvon
sukvvon merged commit 93cb9cf into main Oct 8, 2026
9 checks passed
@sukvvon
sukvvon deleted the chore/preact-import-order-rules branch October 8, 2026 07:17
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