Skip to content

Commit a2f221c

Browse files
committed
Fix coderabbit suggestion
1 parent 85fb0de commit a2f221c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/eslint-plugin-query/src/rules/prefer-query-options/prefer-query-options.utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const MAIN_QUERY_PROPERTIES = ['queryKey', 'queryFn']
77
* @returns true if the node is an object that has main query options (ie queryKey or queryFn).
88
* This is used for detecting inline query options in hooks and functions
99
*/
10-
export function detectQueryOptionsInObject(queryNode: TSESTree.Node) {
10+
export function detectQueryOptionsInObject(queryNode: TSESTree.Node): boolean {
1111
// skip if it's not an object
1212
if (queryNode.type !== AST_NODE_TYPES.ObjectExpression) return false
1313

@@ -19,5 +19,5 @@ export function detectQueryOptionsInObject(queryNode: TSESTree.Node) {
1919
MAIN_QUERY_PROPERTIES.includes(property.key.name),
2020
)
2121

22-
return hasMainQueryProperties
22+
return !!hasMainQueryProperties
2323
}

0 commit comments

Comments
 (0)