query icon indicating copy to clipboard operation
query copied to clipboard

feat(eslint): add type-checked configuration for eslint plugin

Open Newbie012 opened this issue 8 months ago • 7 comments

Created a new configuration for type-checked rules in the ESLint plugin. Added a flat/recommendedTypeChecked config that includes the no-void-query-fn rule which requires TypeScript type information. Added an example project demonstrating the type-checked ESLint setup and updated the documentation to explain how to use it.

Newbie012 avatar Apr 07 '25 09:04 Newbie012

View your CI Pipeline Execution ↗ for commit 26f59084d8d9dba04965f226119c22579060e093.

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 51s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-04-07 16:42:59 UTC

nx-cloud[bot] avatar Apr 07 '25 09:04 nx-cloud[bot]

More templates

@tanstack/angular-query-devtools-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@8966
@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@8966
@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@8966
@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@8966
@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@8966
@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@8966
@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@8966
@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@8966
@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@8966
@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@8966
@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@8966
@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@8966
@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@8966
@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@8966
@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@8966
@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@8966
@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@8966
@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@8966
@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@8966
@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@8966
@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@8966

commit: 26f5908

pkg-pr-new[bot] avatar Apr 07 '25 09:04 pkg-pr-new[bot]

Sizes for commit 26f59084d8d9dba04965f226119c22579060e093:

Branch Bundle Size
Main
This PR

github-actions[bot] avatar Apr 07 '25 09:04 github-actions[bot]

@TkDodo I think something is off with the current nx configuration. It seems like test:lib actually depends on build rather than compile. As you can see in the failing CI, some of the pacakges failed to test:lib since they weren't able to import from query-core (since it was only compiled rather than build)

Newbie012 avatar Apr 07 '25 10:04 Newbie012

It seems like test:lib actually depends on build rather than compile

yes, we are aware and working on it.

TkDodo avatar Apr 07 '25 11:04 TkDodo

@Newbie012 I’ve temporarily set build as a dependency for test:lib to work around this problem.

TkDodo avatar Apr 07 '25 11:04 TkDodo

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 44.30%. Comparing base (97c8d84) to head (26f5908).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8966   +/-   ##
=======================================
  Coverage   44.30%   44.30%           
=======================================
  Files         202      202           
  Lines        8058     8060    +2     
  Branches     1784     1776    -8     
=======================================
+ Hits         3570     3571    +1     
- Misses       4060     4061    +1     
  Partials      428      428           
Components Coverage Δ
@tanstack/angular-query-devtools-experimental ∅ <ø> (∅)
@tanstack/angular-query-experimental 88.08% <ø> (ø)
@tanstack/eslint-plugin-query 88.05% <33.33%> (-0.15%) :arrow_down:
@tanstack/query-async-storage-persister 43.85% <ø> (ø)
@tanstack/query-broadcast-client-experimental ∅ <ø> (∅)
@tanstack/query-codemods 0.00% <ø> (ø)
@tanstack/query-core 94.77% <ø> (ø)
@tanstack/query-devtools 3.61% <ø> (ø)
@tanstack/query-persist-client-core 57.73% <ø> (ø)
@tanstack/query-sync-storage-persister 84.61% <ø> (ø)
@tanstack/react-query 95.42% <ø> (ø)
@tanstack/react-query-devtools 10.00% <ø> (ø)
@tanstack/react-query-next-experimental ∅ <ø> (∅)
@tanstack/react-query-persist-client 100.00% <ø> (ø)
@tanstack/solid-query 78.48% <ø> (ø)
@tanstack/solid-query-devtools ∅ <ø> (∅)
@tanstack/solid-query-persist-client 100.00% <ø> (ø)
@tanstack/svelte-query 88.15% <ø> (ø)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client 100.00% <ø> (ø)
@tanstack/vue-query 71.01% <ø> (ø)
@tanstack/vue-query-devtools ∅ <ø> (∅)
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Apr 07 '25 12:04 codecov[bot]