We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As shown in the docs, this correctly errors:
const useTodos = () => { const { data: todos, ...rest } = useQuery({ queryKey: ['todos'], queryFn: () => api.getTodos(), }) return { todos, ...rest } }
but this does not:
const useTodos = () => { const query = useQuery({ queryKey: ['todos'], queryFn: () => api.getTodos(), }) return { ...rest, data: data[0] } }
It would be great if any destucuring in the same scope could trigger the violation. Is that possible @Newbie012 ?
The text was updated successfully, but these errors were encountered:
Did you mean any query destructing in the same scope?
const useTodos = () => { const query = useQuery({ queryKey: ['todos'], queryFn: () => api.getTodos(), }) return { ...query, data: query.data[0] } }
Sorry, something went wrong.
yes, exactly, sorry, I messed up the code example 🙈
No branches or pull requests
As shown in the docs, this correctly errors:
but this does not:
It would be great if any destucuring in the same scope could trigger the violation. Is that possible @Newbie012 ?
The text was updated successfully, but these errors were encountered: