0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
Commit graph

5,975 commits

Author SHA1 Message Date
Wonsuk Choi
51e68b6b69
fix(examples/solid/{basic,offline}): pass accessors instead of values to query hooks (#11955) 2026-10-11 01:17:10 +09:00
Wonsuk Choi
22621e773c
chore(examples/react): enable 'allowJs' so typed linting covers 'eslint.config.js' (#11950) 2026-10-11 00:51:13 +09:00
Wonsuk Choi
69d9f7c217
chore(examples/solid/simple): replace the legacy '.eslintrc.cjs' with a flat config and run 'test:eslint' (#11949)
* chore(examples/solid/simple): replace the legacy '.eslintrc.cjs' with a flat config and run 'test:eslint'

* chore(examples/solid/simple): build the dependencies before 'test:eslint'

* chore(examples/solid/simple): remove the 'test:eslint' nx override now set in 'nx.json'

* chore(examples/solid/simple): enable 'allowJs' so typed linting covers 'eslint.config.js'
2026-10-11 00:29:24 +09:00
Wonsuk Choi
42745443cf
chore(nx.json): build the dependencies before 'test:eslint' (#11951) 2026-10-10 23:58:26 +09:00
Dominik Dorfmeister 🔮
e22e7c4a27
chore: test TypeScript 7.1 preview and drop 5.6 (#11947)
* chore: test TypeScript 7.1 preview and drop 5.6

* chore: use a mature TypeScript 7.1 preview
2026-10-10 16:26:58 +02:00
Wonsuk Choi
bef879eb56
chore(examples/react): run 'test:eslint' in 'algolia', 'basic-graphql-request' and 'shadow-dom' (#11948)
* chore(examples/react): run 'test:eslint' in 'algolia', 'basic-graphql-request' and 'shadow-dom'

* refactor(examples/react/algolia): derive 'hits' with 'select' instead of spreading the query result
2026-10-10 23:03:54 +09:00
Wonsuk Choi
e3ef138705
chore(oxlint.config): load the jsdoc and vitest JS plugins only in the overrides that use them (#11946) 2026-10-10 13:23:56 +09:00
Wonsuk Choi
a2e0eb2e51
chore(oxfmt.config): replace '.oxfmtrc.json' with 'oxfmt.config.ts' (#11944) 2026-10-10 10:08:39 +09:00
Wonsuk Choi
a8163e00b7
chore(oxlint.config): remove the unused '$schema' (#11943) 2026-10-10 01:56:49 +09:00
Wonsuk Choi
f4600cdf79
chore(oxlint.config): spread the vitest recommended rules instead of listing them (#11942) 2026-10-10 01:46:04 +09:00
Wonsuk Choi
df78a9d137
chore(*): pass the root 'settings' to the package oxlint configs, which 'extends' does not inherit (#11941) 2026-10-10 01:39:06 +09:00
autofix-ci[bot]
6a9a04f9bb
ci: apply automated fixes 2026-10-09 15:50:46 +00:00
Ciarán Curley
833062c2fc
chore: replace prettier with oxfmt (#11939)
Replace prettier with oxfmt

The options and ignores have been ported to the `.oxfmtrc.json` file (oxfmt `printWidth` default is 100 characters, so preserving 80 for now). While the configuration with Prettier is the same, oxfmt seems to modify some things slightly differently, apparently due to the use of a pre-3.9 Prettier layout for union types that break onto their own line so we still end up with about 30 files changed. 

Files with actual changes are:

- `.prettierignore`.`prettier.config.js`: Deleted. Replaced with `.oxfmtrc.json`
- `package.json`: `format` script changed to `oxfmt`. Added `oxfmt` and `svelte` as `devDependencies`; removed `prettier` and `prettier-plugin-svelte`.
- `pnpm-lock.yaml`: Lockfile update for the dependency changes above.
- `scripts/generate-labeler-config.ts`: Formats with oxfmt's `format()` API instead of Prettier's. It reads `.oxfmtrc.json` itself, because the API doesn't find config files on its own, and throws if formatting reports errors. Its output is identical to what Prettier produced.


Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:47:26 +01:00
Ciarán Curley
d0cfa6a4a8
chore: replace eslint with oxlint (#11938)
* chore: replace eslint with oxlint

Migrates to oxlint as the replacement linter for eslint.

Keeps the existing ruleset, runs js plugins for non-native oxlint rules and the local no-restricted-syntax plugin

Svelte packages keep a slim ESLint config for the svelte/* rules, which need the component template.
React examples that use the query eslint plugin also still use eslint for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: use oxlint disable directives

ESLint no longer lints these files, so switch eslint-disable comments to
oxlint-disable and the @typescript-eslint/ prefix to typescript/. Remove
directives that oxlint reports as unused, and name the rule in the
cspell oxlint-enable comments, which oxlint does not match to a
rule-specific disable otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: lint expectTypeOf with vitest valid-expect

Oxlint's native vitest/valid-expect only checks `expect` calls, so load
@vitest/eslint-plugin as a JS plugin for this rule to keep flagging
`expectTypeOf` calls without a matcher, and restore the directives for
the intentional ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:35:33 +01:00
Wonsuk Choi
71536972b5
docs(vue-query/useMutation): add JSDoc to 'MutationResult' (#11937)
* docs(vue-query/useMutation): add JSDoc to 'MutationResult'

* docs(vue-query): regenerate reference docs for 'MutationResult'
2026-10-10 00:05:13 +09:00
autofix-ci[bot]
817bd02659
ci: apply automated fixes 2026-10-09 11:19:04 +00:00
Kirby
69e114aecf
fix(vue-query): export MutationResult type (#11796)
`UseMutationReturnType` uses `MutationResult` as the default for its
`TResult` parameter, but the alias was not exported. Projects that emit
declarations could not name the inferred return type of a `useMutation`
wrapper and failed with TS2883. Export it from the package root.

Fixes #11769

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Ciarán Curley <ciaran.curley.11.11@gmail.com>
2026-10-09 12:17:10 +01:00
Wonsuk Choi
aab352876a
chore(solid-query*): add 'eslint-plugin-solid' (#11929)
* chore(solid-query*): add 'eslint-plugin-solid'

* chore(solid-query*): explain why 'solid/reactivity' is off and keep it on in 'solid-query-persist-client'
2026-10-08 18:59:06 +09:00
Wonsuk Choi
01a7ebdd02
chore(preact-query*): clarify why the base rules from 'eslint-config-preact' are turned off (#11928) 2026-10-08 16:47:07 +09:00
Wonsuk Choi
79e2e4244e
chore(preact-query*): enable '@typescript-eslint/no-unnecessary-condition' outside tests (#11927) 2026-10-08 16:40:49 +09:00
Wonsuk Choi
24569675b6
chore(preact-query*): remove '@typescript-eslint/no-redeclare' (#11926) 2026-10-08 16:32:38 +09:00
Wonsuk Choi
c7a22584ea
chore(preact-query*): enable '@typescript-eslint/array-type' and '@typescript-eslint/no-unnecessary-type-assertion' (#11925) 2026-10-08 16:20:59 +09:00
Wonsuk Choi
93cb9cf6e4
chore(preact-query*): enable 'import/order' and 'sort-imports' (#11924) 2026-10-08 16:17:10 +09:00
Wonsuk Choi
d169ee8778
docs(*): add property tables and overload overviews to reference pages and keep declared alias names (#11758)
* docs(*): add parameter and result property tables to reference function pages and an overview to overloaded ones

* docs(*): link to the base type's properties when a parameter or result type has no property table

* docs(framework/*/reference): regenerate reference docs

* docs(framework/*/reference): regenerate reference docs

* chore(scripts/generate-docs): restore the 'dirname' import that the merge dropped

* docs(framework/*/reference): regenerate reference docs

* docs(scripts/generate-docs): label overloads in the overview with their declared parameter and return types

* docs(framework/*/reference): regenerate reference docs

* docs(scripts/generate-docs): convert declared intersection types from the source so signatures keep their alias names

* docs(framework/*/reference): regenerate reference docs

* docs(scripts/generate-docs): reword a comment to avoid the unknown word 'inlines'

* docs(scripts/generate-docs): skip a parameter table on overloaded pages when its heading is missing
2026-10-06 02:38:27 +09:00
Wonsuk Choi
1d2cf91305
chore(*): update '@tanstack/typedoc-config' to v0.3.4 (#11817)
* chore(*): update '@tanstack/typedoc-config' to v0.3.4 and load its custom settings plugin by package export

* docs(framework/*/reference): regenerate reference docs with '@tanstack/typedoc-config' v0.3.4

* docs(framework/*/reference): regenerate reference docs

* docs(framework/*/reference): regenerate reference docs
2026-10-05 12:41:28 +09:00
Wonsuk Choi
271a4ed77e
refactor(lit-query): add the 'override' modifier to the implementations of the abstract controller hooks and document the hooks (#11913)
* refactor(lit-query): add the 'override' modifier to the implementations of the abstract controller hooks

* docs(lit-query/BaseController): note that 'onQueryClientChanged' also runs when no client is found

* docs(lit-query/BaseController): note that 'onConnected' may run without a client
2026-10-05 12:30:08 +09:00
Wonsuk Choi
eaa75f4f8f
chore(tsconfig): enable 'noImplicitOverride' (#11912) 2026-10-05 03:58:27 +09:00
Wonsuk Choi
4e1476cb69
test(solid-query): add the 'override' modifier to test classes that override a base class member (#11911) 2026-10-05 03:42:52 +09:00
Wonsuk Choi
7f0e7e2e36
test(preact-query): add the 'override' modifier to test classes that override a base class member (#11910) 2026-10-05 03:42:45 +09:00
Wonsuk Choi
ec66fc317b
test(lit-query): add the 'override' modifier to test classes that override a base class member (#11909) 2026-10-05 03:42:37 +09:00
Wonsuk Choi
d11907b937
test(query-core): add the 'override' modifier to test classes that override a base class member (#11908) 2026-10-05 03:42:29 +09:00
Wonsuk Choi
8a0a9b10c1
chore(eslint.config): require JSDoc on the methods of exported classes (#11907)
* chore(eslint.config): require JSDoc on the methods of exported classes

* chore(eslint.config): also require JSDoc on the methods of default-exported classes
2026-10-05 03:31:52 +09:00
Wonsuk Choi
ec8c6de884
refactor(lit-query): add the 'override' modifier to members that override a base class member (#11906) 2026-10-05 03:21:20 +09:00
Wonsuk Choi
866d5429f0
refactor(vue-query): add the 'override' modifier to members that override a base class member (#11905) 2026-10-05 03:21:02 +09:00
Wonsuk Choi
65f762e292
refactor(query-core): add the 'override' modifier to members that override a base class member (#11904) 2026-10-05 03:20:52 +09:00
Wonsuk Choi
688f6e0722
docs(*): describe 'shadowDOMTarget' as the shadow DOM the devtools styles are applied within (#11902) 2026-10-05 02:17:04 +09:00
Wonsuk Choi
a6e8763a78
chore(eslint.config): require JSDoc on the properties of exported interfaces and type aliases (#11901) 2026-10-05 02:08:45 +09:00
Wonsuk Choi
9dd4d7d506
docs(query-core/types): add JSDoc to the properties of the exported interfaces and type aliases (#11891)
* docs(query-core/types): add JSDoc to the properties of the exported interfaces and type aliases

* docs(query-core/types): mention mutations in the 'hydrate' default options description
2026-10-05 01:55:45 +09:00
Wonsuk Choi
e3415e0149
docs(eslint-plugin-query): add JSDoc to the properties of the exported interfaces and type aliases (#11900) 2026-10-05 01:55:10 +09:00
Wonsuk Choi
30e03ad077
docs(query-devtools): add JSDoc to the properties of the exported interfaces and type aliases (#11899) 2026-10-05 01:53:12 +09:00
Wonsuk Choi
1fd8ecea49
docs(angular-query-experimental): add JSDoc to the properties of the exported interfaces and type aliases (#11898) 2026-10-05 01:52:37 +09:00
Wonsuk Choi
1e6b56187f
docs(svelte-query): add JSDoc to the properties of the exported interfaces and type aliases (#11897) 2026-10-05 01:52:02 +09:00
Wonsuk Choi
25c1e6c1ad
docs(vue-query): add JSDoc to the properties of the exported interfaces and type aliases (#11896)
* docs(vue-query): add JSDoc to the properties of the exported interfaces and type aliases

* docs(vue-query/types): mention mutations in the 'hydrate' default options description
2026-10-05 01:51:28 +09:00
Wonsuk Choi
b18e7ab6f4
docs(solid-query): add JSDoc to the properties of the exported interfaces and type aliases (#11895) 2026-10-05 01:50:30 +09:00
Wonsuk Choi
0012ec14c3
docs(react-query): add JSDoc to the properties of the exported interfaces and type aliases (#11894) 2026-10-05 01:49:55 +09:00
Wonsuk Choi
0aa83a0188
docs(*): add JSDoc to the properties of the exported interfaces and type aliases of the persisters and the broadcast client (#11893) 2026-10-05 01:49:21 +09:00
Wonsuk Choi
9962ee1fe2
docs(query-core): add JSDoc to the properties of the exported interfaces and type aliases outside 'types.ts' (#11892) 2026-10-05 01:48:47 +09:00
Wonsuk Choi
cacd9cb8ca
chore(eslint.config): require JSDoc on exported classes and arrow functions (#11890)
* chore(eslint.config): require JSDoc on exported classes and arrow functions

* chore(eslint.config): also require JSDoc on default-exported classes and arrow functions
2026-10-05 01:37:10 +09:00
Wonsuk Choi
f9fe54c960
docs(eslint-plugin-query): add JSDoc to the exported classes, methods, and arrow functions (#11888) 2026-10-04 13:06:11 +09:00
Wonsuk Choi
7933146d9a
docs(query-test-utils): add JSDoc to the exported classes, methods, and arrow functions (#11887) 2026-10-04 13:05:36 +09:00