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>
* 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>
* docs(react-query): add JSDoc to the exported classes, methods, and arrow functions
* docs(react-query-persist-client/PersistQueryClientProvider): describe what is deferred while restoring and when the callbacks run
* docs(*): note that 'throwOnError' makes the hook rethrow the errors of 'mutate'
* docs(angular-query-experimental/types): mention that 'injectMutation' emits the error on 'ngZone.onError' before rethrowing it
* docs(react-query): add missing JSDoc to react-query, react-query-next-experimental, and react-query-devtools
* docs(react-query-next-experimental): correct where streamed hydration and HTML insertion happen
* docs(*): fix JSDoc '@param' names that don't match the parameters
* chore(eslint.config): raise 'jsdoc/check-param-names' to error without requiring destructured properties
* test(*): start test titles with 'should'
* test(*): start the remaining test titles with 'should'
* test(eslint-plugin-query): start 'it.each' titles with 'should'
* test({react,preact}-query/useSuspenseQueries): fix title to match the assertion that 'TData' excludes 'undefined'
* refactor(react-query*): rename local 'useRef' and 'createContext' variables to follow '@eslint-react' naming conventions
* test(react-query): follow '@eslint-react' recommended rules with 'useState' value and setter pairs, stable keys, and disables for nested component false positives
* chore(*): update '@eslint-react/eslint-plugin' to v5 and apply its 'recommended' config that was overridden
* chore(*): list 'react-hooks' rules before '@eslint-react' rules to match the config order
* chore(*): update 'eslint-plugin-react-hooks' to v7 and remove the '@ts-expect-error' for its config
* chore(*): use stable 'recommended' config of 'eslint-plugin-react-hooks' instead of 'recommended-latest'
* chore(*): remove 'react-hooks/rules-of-hooks' override that duplicates the 'recommended' config
* test({react-query,preact-query}): keep each action, wait and assertion together and separate each new user action
* test({react-query,preact-query}): remove remaining blank lines around a commented assertion and 'act' wait blocks
* test(react-query/useSuspenseQueries): remove blank line between the 'fireEvent' wrapped in 'expect' and its wait
* test({react-query,preact-query}): add blank lines after setup such as 'renderWithClient', 'rerender' and 'queryClient' calls
* test({react-query,preact-query}-persist-client): remove blank lines between assertions, waits and their assertions
* test(react-query/transition): remove blank lines between 'act' wrapped 'fireEvent' and its assertions
* test({react-query,preact-query}): add blank lines before 'fireEvent' after multi-line assertions and keep prefetch with its wait
* test(query-core/utils): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant
* test(react-query/utils): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant
* test(preact-query/utils): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant
* test({query-core,react-query,preact-query}/utils): rename 'original' to 'originalIsServer' in 'setIsServer'
* docs({react-query,preact-query,solid-query,svelte-query}/README): point the CI badge at the 'release.yml' workflow on 'main'
* docs({react-query,preact-query,solid-query,svelte-query}/README): add alt text to the release badge