Community ESLint plugin enforcing best practices for React Query (TanStack Query) v3+. Current version 1.3.0, released February 2022, with slow release cadence. Adds rules for useQuery object syntax, missing queryKey, and mutationKey. Differentiator: lightweight, dedicated linting for React Query patterns, complementary to the official plugin. Alternative to @tanstack/eslint-plugin-query which is more maintained.
npm install eslint-plugin-react-queryVerified import paths — ran on the pinned version, not inferred.
Set up ESLint with react-query plugin rules including object syntax enforcement.
Switch to @tanstack/eslint-plugin-query for official support.
Use object syntax for useQuery to avoid warnings.
Manually enforce keys for other hooks or use other lint rules.
Run: npm install --save-dev eslint-plugin-react-query
Check supported rules in README: mutation-key, prefer-query-object-syntax, query-key.