test(eslint-plugin-query/no-void-query-fn): add coverage for prefetchQuery, prefetchInfiniteQuery, ensureQueryData, ensureInfiniteQueryData#10353
Conversation
…Query, prefetchInfiniteQuery, ensureQueryData, ensureInfiniteQueryData
|
View your CI Pipeline Execution ↗ for commit 7e21b8b
☁️ Nx Cloud last updated this comment at |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds test coverage for an ESLint rule in the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Follows #10332, which added
no-void-query-fncoverage foruseInfiniteQuery,useSuspenseQuery,queryOptions, andfetchQuery. The four remainingQueryClientmethods that accept aqueryFnhad no tests:prefetchQuery,prefetchInfiniteQuery,ensureQueryData, andensureInfiniteQueryData.Adds 5 valid cases and 5 invalid cases, one pair per method. No rule changes — the existing
Propertynode check already handles these correctly.All 1548 existing tests continue to pass.
Checklist
Summary by CodeRabbit
QueryClientmethods (prefetchQuery,prefetchInfiniteQuery,ensureQueryData,ensureInfiniteQueryData) to ensure proper detection of query function return value handling.