TanStack query eslint prefer object syntax rule not found
Hi everyone,
I'm just in the process of updating my react-native mobile app and I've come across an eslint error.
The error suggests that the object syntax rule definition can't be found which doesn't seem right as the eslint config is taken directly from the eslint plugin docs see https://tanstack.com/query/v4/docs/react/eslint/eslint-plugin-query
I'm using v4 of tanstack query still and I can see that it's installed version "^5.0.5" of the eslint package, does the tanstack query and eslint package need to be in sync are they managed separately ? If they need to be managed separately I might need to install v4 but if that's not the case then I'm unsure why I'm receiving this error.
Would appreciate any comments/responses ❤️
ESLint Plugin Query | TanStack Query Docs
TanStack Query comes with its own ESLint plugin. This plugin is used to enforce best practices and to help you avoid common mistakes.
Installation

3 Replies
correct-apricot•3y ago
Object syntax is the only syntax possible in v5 so I imagine the rule was removed in the v5 eslint
exotic-emerald•3y ago
Yeah it's no longer in main. I suppose the docs just need an update
Looks like its already been removed from /docs too: https://github.com/TanStack/query/tree/main/docs/react/eslint
https://tanstack.com/query/latest/docs/react/eslint/eslint-plugin-query
fair-roseOP•3y ago
Ah cool I'll just update to v5 then or downgrade to the appropriate version on query then.