You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[eslint-plugin-query] no-void-query-fn false positive on enum returns with TypeScript 6 #10461
The no-void-query-fn rule incorrectly reports queryFn must return a non-undefined value when a queryFn returns a TypeScript enum member. This only occurs when using TypeScript 6.0.
On investigating, looks like we're implicitly relying on these values for TypeFlags which should be internal to TS.
The underlying values for TypeFlags were reorderd in this change: microsoft/TypeScript#63084. This ends up actually testing for UniqueESSymbol | EnumLiteral instead of Void | Undefined as intended.
Steps to reproduce
On TypeScript 6, the below triggers the lint violation:
Activity
fix(eslint-plugin-query): use TypeFlags from typescript instead of ha…