Skip to content

Commit f6757a6

Browse files
ShyneADLTkDodolachlancollins
authored
fix(react-query): eslint-plugin-query now working with vanilla js (TanStack#8322)
* fix: eslint-plugin-query not working with vanilla js * Update packages/eslint-plugin-query/src/utils/detect-react-query-imports.ts * Disabled linter for conditional statement This should make it pass the eslint-plugin test --------- Co-authored-by: Dominik Dorfmeister <[email protected]> Co-authored-by: Lachlan Collins <[email protected]>
1 parent d08d115 commit f6757a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/eslint-plugin-query/src/utils/detect-react-query-imports.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ export function detectTanstackQueryImports(create: EnhancedCreate): Create {
5555
ImportDeclaration(node) {
5656
if (
5757
node.specifiers.length > 0 &&
58-
node.importKind === 'value' &&
58+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
59+
(node.importKind === 'value' || node.importKind === undefined) &&
5960
node.source.value.startsWith('@tanstack/') &&
6061
node.source.value.endsWith('-query')
6162
) {

0 commit comments

Comments
 (0)