-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Describe the bug
The ESLint plugin is turning the mutation function into the mutation key
Your minimal, reproducible example
https://stackblitz.com/edit/vitejs-vite-6buzvj?file=src%2Fmain.ts&terminal=dev
Steps to reproduce
- Press ctrl-c to exit the vite dev server
- Run
npx eslint src/main.ts --fix - Observe that
useMutation(() => Promise.resolve(3));turned intouseMutation({ mutationKey: () => Promise.resolve(3) });
Expected behavior
I expected useMutation({ mutationFn: () => Promise.resolve(3) });
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- Linux
- Firefox
- 109.0
TanStack Query version
v4.24.5 of @tanstack/eslint-plugin-query
TypeScript version
No response
Additional context
No response
ArttuOll and ashwinGokhale
Metadata
Metadata
Assignees
Labels
No labels