Skip to content

chore(*): adopt '@tanstack/oxlint-config' and '@tanstack/oxfmt-config', and fix the newly reported lint errors - #12555

Open
sukvvon wants to merge 4 commits into
mainfrom
chore/use-tanstack-oxlint-config
Open

sukvvon wants to merge 4 commits into
mainfrom
chore/use-tanstack-oxlint-config

Conversation

@sukvvon

@sukvvon sukvvon commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

🎯 Changes

Adopt the shared @tanstack/oxlint-config and @tanstack/oxfmt-config, and bump @tanstack/eslint-config to 0.5.0.

  • oxlint.config.ts: extend tanstackConfig and drop the rules it already provides, including the @stylistic/spaced-comment setup. env and ignorePatterns are still spread explicitly because extends does not inherit them.
  • Remove import-js/order and its 'off' overrides in four package configs. Import order is now left to Oxfmt's sortImports.
  • scripts/oxlint/plugin.ts: remove the local type-parameter-naming rule, which the shared config now covers, and move the file to scripts/oxlint-plugin.ts to match the flat layout of scripts.
  • oxfmt.config.ts: spread tanstackConfig. Import sorting is applied across the repo.
    • Under examples/svelte/**, $app/ and $lib/ are added to internalPattern.
    • The SvelteKit examples set the matching import-x/internal-regex, so import/order and sortImports agree on SvelteKit aliases.
  • Top-of-file directives (// @ts-nocheck, // @vitest-environment node, /* @refresh reload */) are followed by a blank line, so sortImports keeps them at the top.
  • Fix the errors reported by the newly enabled rules:
    • prefer-const: 3 in the svelte-query tests.
    • no-case-declarations: 2 in query-core/src/query.ts, fixed with block-scoped cases.
    • typescript/no-unsafe-function-type:
      • Type tests use (...args: Array<any>) => any.
      • vue-query's internal isFunction and getter cast use specific function types.
      • The rule is disabled, with a reason, where the wider Function is intended: Subscribable, NonFunctionGuard, UnwrapLeaf, MaybeRefDeep, MapToSignals, and the devtools callbacks that match Solid's Setter.
  • Remove @stylistic/eslint-plugin and eslint-plugin-import-x from the root devDependencies, since the shared configs provide them.
  • Add the new config versions to minimumReleaseAgeExclude.
  • Run pnpm dedupe, and update @typescript-eslint/parser and @typescript-eslint/rule-tester to ^8.72.1 so they match the deduped @typescript-eslint/utils.

Runtime behavior is unchanged. The built query-core output differs only by block-scoped cases and the order of non-circular imports.

✅ 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).

@sukvvon
sukvvon requested a review from a team as a code owner November 8, 2026 05:32
@sukvvon sukvvon self-assigned this Nov 8, 2026
@changeset-bot

changeset-bot Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 31796a1

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

@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

@nx-cloud

nx-cloud Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 31796a1

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

☁️ Nx Cloud last updated this comment at 2026-11-08 05:59:44 UTC

@socket-security

socket-security Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 8, 2026

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

pkg-pr-new Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 31796a1

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.85 KB (0%)
react minimal 8.68 KB (+0.11% 🔺)

…typescript-eslint/rule-tester' to '^8.72.1' to match the deduped '@typescript-eslint/utils'

This branch has not been deployed

No deployments
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