TanStack / query

πŸ€– Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.
https://tanstack.com/query
MIT License
42.67k stars 2.92k forks source link

feat(eslint-plugin-query): add Suspense query hooks to no-rest-destructuring rule #8260

Closed gyumong closed 2 weeks ago

gyumong commented 2 weeks ago

This PR adds 'useSuspenseQuery' , 'useSuspenseQueries' and 'useSuspenseInfiniteQuery' to the queryHooks array in the no-rest-destructuring ESLint rule.

issue: #8231

nx-cloud[bot] commented 2 weeks ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 8f35dc6bbbdac1ad58d1b9300d57513ef10e5c77. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

πŸ“‚ See all runs for this CI Pipeline Execution


βœ… Successfully ran 2 targets - [`nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build --parallel=3`](https://cloud.nx.app/runs/qdOXMAuXBb?utm_source=pull-request&utm_medium=comment) - [`nx run-many --target=build --exclude=examples/** --exclude=integrations/**`](https://cloud.nx.app/runs/RVw7xqn4m5?utm_source=pull-request&utm_medium=comment)

Sent with πŸ’Œ from NxCloud.

pkg-pr-new[bot] commented 2 weeks ago

Open in Stackblitz

More templates

- [@tanstack/query-example-angular-basic](https://pkg.pr.new/template/bb615741-6e4d-4924-b1bc-56fa2c9f1e11) - [@tanstack/query-example-angular-devtools-panel](https://pkg.pr.new/template/ad6aaf7c-cefc-4f45-b401-33d2ff511e53) - [@tanstack/query-example-angular-pagination](https://pkg.pr.new/template/772ca4cc-e6f8-412f-84da-d6874c44222f) - [@tanstack/query-example-angular-infinite-query-with-max-pages](https://pkg.pr.new/template/887b4cf4-3e52-4a89-b1ad-3b26a5dad6c9) - [@tanstack/query-example-angular-query-options-from-a-service](https://pkg.pr.new/template/540e1f01-bbe3-47bf-a73c-949bbb5a441c) - [@tanstack/query-example-angular-router](https://pkg.pr.new/template/69f59377-97d2-4964-8fb1-5479f47b7a97) - [@tanstack/query-example-angular-rxjs](https://pkg.pr.new/template/4c75381c-ad99-4b95-8c80-8336e46b6ea0) - [@tanstack/query-example-angular-simple](https://pkg.pr.new/template/02b05c52-5ca0-404c-8b51-5cf7fb116d4b) - [@tanstack/query-example-react-auto-refetching](https://pkg.pr.new/template/52704e7e-8eee-444f-a740-52140ca76ccd) - [@tanstack/query-example-react-algolia](https://pkg.pr.new/template/981afa9e-2b17-4473-bd5f-ba74c8bdfce8) - [@tanstack/query-example-react-basic](https://pkg.pr.new/template/7c378ec8-31fd-4be5-b352-792097e89115) - [@tanstack/query-example-react-basic-graphql-request](https://pkg.pr.new/template/dca9440b-b908-4968-b833-ced4d9bcbf39) - [@tanstack/query-example-react-default-query-function](https://pkg.pr.new/template/81102a9a-4877-4741-b72c-589f954cfc65) - [@tanstack/query-example-react-devtools-panel](https://pkg.pr.new/template/a2cdf445-8e82-462c-9205-95e899776957) - [@tanstack/query-example-react-infinite-query-with-max-pages](https://pkg.pr.new/template/e5a454f1-1041-4046-8dfd-85ba47f1e17e) - [@tanstack/query-example-react-load-more-infinite-scroll](https://pkg.pr.new/template/1de3c6b4-923f-4c1d-988f-47b0bf22d990) - [@tanstack/query-example-react-nextjs](https://pkg.pr.new/template/f50c1606-eb91-411d-9784-ed90762a8869) - [@tanstack/query-example-nextjs-suspense-streaming](https://pkg.pr.new/template/2fa03814-d5bd-4bb7-8f71-0e5f4a6b5c0d) - [@tanstack/query-example-react-nextjs-app-prefetching](https://pkg.pr.new/template/4cfea00f-e754-43ae-803e-a1a072b5e8dd) - [@tanstack/query-example-react-offline](https://pkg.pr.new/template/81550223-797a-4fc5-a63e-073d1c39b708) - [@tanstack/query-example-react-optimistic-updates-cache](https://pkg.pr.new/template/4e3e2700-455f-4b9c-ab9a-c7b619c2ced5) - [@tanstack/query-example-react-optimistic-updates-ui](https://pkg.pr.new/template/09d88950-724a-420c-b1ea-37422099f086) - [@tanstack/query-example-react-pagination](https://pkg.pr.new/template/f099cb18-2382-4f9f-aafe-25eb8cc8b514) - [@tanstack/query-example-react-playground](https://pkg.pr.new/template/3cdee8a8-e882-4176-b71b-122b3718add1) - [@tanstack/query-example-react-router](https://pkg.pr.new/template/18e9ae80-91b8-47a2-8a73-4cdfbdfc850f) - [@tanstack/query-example-react-react-native](https://pkg.pr.new/template/edef6102-f915-48f7-926a-49f81e24fe37) - [@tanstack/query-example-react-prefetching](https://pkg.pr.new/template/e426c491-6658-48d5-ac0b-c295eb276ba6) - [@tanstack/query-example-react-shadow-dom](https://pkg.pr.new/template/91995501-09cb-445d-ba0c-42019fc521fa) - [@tanstack/query-example-react-rick-morty](https://pkg.pr.new/template/8a57118e-6541-4836-8c80-37d7734b11f5) - [@tanstack/query-example-react-simple](https://pkg.pr.new/template/4e284e34-c5fa-440f-b405-33f3c8a3455a) - [@tanstack/query-example-react-suspense](https://pkg.pr.new/template/d8494a13-fa21-4fcd-b456-e6393b18e2b9) - [@tanstack/query-example-react-star-wars](https://pkg.pr.new/template/915dfc84-e3ac-450c-ac5c-a48c08be79d5) - [@tanstack/query-example-svelte-auto-refetching](https://pkg.pr.new/template/3e81e6db-2490-44fc-a155-c40983786c56) - [@tanstack/query-example-svelte-basic](https://pkg.pr.new/template/966b91e6-09f5-439e-8b06-c1a49bee8ead) - [@tanstack/query-example-svelte-load-more-infinite-scroll](https://pkg.pr.new/template/b09683e5-f726-4298-9e83-5473dc975a98) - [@tanstack/query-example-svelte-optimistic-updates](https://pkg.pr.new/template/ff89f069-0f94-4646-9525-b75d50213da1) - [@tanstack/query-example-svelte-playground](https://pkg.pr.new/template/1b421c3f-403e-4855-bc13-7b04cc6f80b2) - [@tanstack/query-example-svelte-simple](https://pkg.pr.new/template/46853884-f1dd-4448-a534-57b34c3152f0) - [@tanstack/query-example-svelte-ssr](https://pkg.pr.new/template/caabb026-d0bd-4d52-b3f3-0c3e4d212054) - [@tanstack/query-example-svelte-star-wars](https://pkg.pr.new/template/8715625f-c088-4bef-8e36-bffd87bcd2a8) - [@tanstack/query-example-solid-astro](https://pkg.pr.new/template/0649ae20-9d91-4967-bfae-f0c8774ef1fc) - [@tanstack/query-example-solid-basic](https://pkg.pr.new/template/1f84cc50-8b2c-4213-b1d7-f2d1204581f5) - [@tanstack/query-example-solid-basic-graphql-request](https://pkg.pr.new/template/178bf9e3-78ca-4599-9a66-d003e1cad26f) - [@tanstack/query-example-solid-default-query-function](https://pkg.pr.new/template/f1f441c9-5be0-477c-b8d9-658d9c7a3c80) - [@tanstack/query-example-solid-simple](https://pkg.pr.new/template/ad1ff9c9-ad21-4f38-b6de-01fd07e7ef96) - [@tanstack/query-example-solid-start-streaming](https://pkg.pr.new/template/942e47d0-afb9-47de-ad02-6bdecaec44af) - [@tanstack/query-example-vue-2.6-basic](https://pkg.pr.new/template/3e0f77b9-3bed-450f-bc92-62ced0daa376) - [@tanstack/query-example-vue-2.7-basic](https://pkg.pr.new/template/6d4deba4-9e64-4673-a29a-ea831d98215a) - [@tanstack/query-example-vue-basic](https://pkg.pr.new/template/d6cccede-6de7-4041-a73e-47bce5c07a0a) - [@tanstack/query-example-vue-dependent-queries](https://pkg.pr.new/template/ad23400d-9560-49b2-aee0-c61517921783) - [@tanstack/query-example-vue-nuxt3](https://pkg.pr.new/template/c95211ec-fada-4f64-82c6-6c5ec12a8cc6) - [@tanstack/query-example-vue-persister](https://pkg.pr.new/template/5c78fbaf-7c9b-4faf-831a-82114df9a743) - [@tanstack/query-example-vue-simple](https://pkg.pr.new/template/89dc764a-5b7f-4bd0-9076-3db6a4943fd4)

@tanstack/angular-query-devtools-experimental

``` pnpm add https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@8260 ```

@tanstack/query-async-storage-persister

``` pnpm add https://pkg.pr.new/@tanstack/query-async-storage-persister@8260 ```

@tanstack/query-broadcast-client-experimental

``` pnpm add https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@8260 ```

@tanstack/query-core

``` pnpm add https://pkg.pr.new/@tanstack/query-core@8260 ```

@tanstack/angular-query-experimental

``` pnpm add https://pkg.pr.new/@tanstack/angular-query-experimental@8260 ```

@tanstack/eslint-plugin-query

``` pnpm add https://pkg.pr.new/@tanstack/eslint-plugin-query@8260 ```

@tanstack/query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/query-devtools@8260 ```

@tanstack/query-persist-client-core

``` pnpm add https://pkg.pr.new/@tanstack/query-persist-client-core@8260 ```

@tanstack/query-sync-storage-persister

``` pnpm add https://pkg.pr.new/@tanstack/query-sync-storage-persister@8260 ```

@tanstack/react-query

``` pnpm add https://pkg.pr.new/@tanstack/react-query@8260 ```

@tanstack/react-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/react-query-devtools@8260 ```

@tanstack/react-query-next-experimental

``` pnpm add https://pkg.pr.new/@tanstack/react-query-next-experimental@8260 ```

@tanstack/react-query-persist-client

``` pnpm add https://pkg.pr.new/@tanstack/react-query-persist-client@8260 ```

@tanstack/solid-query

``` pnpm add https://pkg.pr.new/@tanstack/solid-query@8260 ```

@tanstack/solid-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/solid-query-devtools@8260 ```

@tanstack/solid-query-persist-client

``` pnpm add https://pkg.pr.new/@tanstack/solid-query-persist-client@8260 ```

@tanstack/svelte-query

``` pnpm add https://pkg.pr.new/@tanstack/svelte-query@8260 ```

@tanstack/svelte-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/svelte-query-devtools@8260 ```

@tanstack/svelte-query-persist-client

``` pnpm add https://pkg.pr.new/@tanstack/svelte-query-persist-client@8260 ```

@tanstack/vue-query

``` pnpm add https://pkg.pr.new/@tanstack/vue-query@8260 ```

@tanstack/vue-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/vue-query-devtools@8260 ```

commit: 8f35dc6

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.32%. Comparing base (2fe16e5) to head (8f35dc6). Report is 63 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/TanStack/query/pull/8260/graphs/tree.svg?width=650&height=150&src=pr&token=jqEbswkEDQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack)](https://app.codecov.io/gh/TanStack/query/pull/8260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) ```diff @@ Coverage Diff @@ ## main #8260 +/- ## =========================================== + Coverage 45.41% 88.32% +42.91% =========================================== Files 200 15 -185 Lines 7456 497 -6959 Branches 1696 186 -1510 =========================================== - Hits 3386 439 -2947 + Misses 3694 44 -3650 + Partials 376 14 -362 ``` | [Components](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | Coverage Ξ” | | |---|---|---| | [@tanstack/angular-query-devtools-experimental](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/angular-query-experimental](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/eslint-plugin-query](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `88.32% <100.00%> (+0.50%)` | :arrow_up: | | [@tanstack/query-async-storage-persister](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/query-broadcast-client-experimental](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/query-codemods](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/query-core](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/query-persist-client-core](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/query-sync-storage-persister](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/react-query](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/react-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/react-query-next-experimental](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/react-query-persist-client](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/solid-query](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/solid-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/solid-query-persist-client](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/svelte-query](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/svelte-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/svelte-query-persist-client](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/vue-query](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | | | [@tanstack/vue-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8260/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `βˆ… <ΓΈ> (βˆ…)` | |
SimenB commented 2 weeks ago

Thanks! πŸ‘