Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint-plugin-query not working with vanilla JS #8257

Open
tw-hedgehog opened this issue Nov 6, 2024 · 1 comment · May be fixed by #8322
Open

eslint-plugin-query not working with vanilla JS #8257

tw-hedgehog opened this issue Nov 6, 2024 · 1 comment · May be fixed by #8322

Comments

@tw-hedgehog
Copy link

Describe the bug

Seems like eslint-plugin-query is not working with vanilla JS apps.

Did some digging and it seems like in /utils/detect-react-query-imports.ts -> detectionInstructions it specifically wants node.importKind === 'value' but from my research this is only set for TS. In JS it's undefined. (link to src)

Your minimal, reproducible example

https://stackblitz.com/edit/react-query-lint

Steps to reproduce

run npm run lint in console (it should also run automatically when link is opened)

Expected behavior

detect "@tanstack/query/stable-query-client" and "@tanstack/query/no-rest-destructuring" errors

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

stackblitz

Tanstack Query adapter

react-query

TanStack Query version

5.59.19

TypeScript version

no typescript

Additional context

No response

@ShyneADL
Copy link

Please assign this task to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants