Eslint plugin for tanstack query to enforce using the queryOptions
api inspired by this post from TkDodo
import reactQueryOptions from "eslint-plugin-react-query-options";
export default [
// ...
reactQueryOptions.configs.recommended,
];
💼 Configurations enabled in.
✅ Set in the recommended
configuration.
Name | Description | 💼 |
---|---|---|
invalidate-queries-no-inline-query | Enforces queryClient.invalidateQueries don't have inline queries. Will error if queryKey or queryFn properties are passed to the function | ✅ |
use-query-no-inline-query | Enforces useQuery (and family) hooks use some form of query constructor pattern. Will error if queryKey or queryFn properties are passed to the hook | ✅ |
Name | |
---|---|
✅ | recommended |