@tanstack/eslint-plugin-query 4.26.2 → 4.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
2
+ import type TSESLintScopeManager from '@typescript-eslint/scope-manager';
2
3
  import { AST_NODE_TYPES } from '@typescript-eslint/utils';
3
4
  import type { RuleContext } from '@typescript-eslint/utils/dist/ts-eslint';
4
5
  export declare const ASTUtils: {
@@ -17,12 +18,18 @@ export declare const ASTUtils: {
17
18
  getNestedIdentifiers(node: TSESTree.Node): TSESTree.Identifier[];
18
19
  isAncestorIsCallee(identifier: TSESTree.Node): boolean;
19
20
  traverseUpOnly(identifier: TSESTree.Node, allowedNodeTypes: AST_NODE_TYPES[]): TSESTree.Node;
21
+ isDeclaredInNode(params: {
22
+ functionNode: TSESTree.Node;
23
+ reference: TSESLintScopeManager.Reference;
24
+ scopeManager: TSESLint.Scope.ScopeManager;
25
+ }): boolean;
20
26
  getExternalRefs(params: {
21
27
  scopeManager: TSESLint.Scope.ScopeManager;
22
28
  sourceCode: Readonly<TSESLint.SourceCode>;
23
29
  node: TSESTree.Node;
24
30
  }): TSESLint.Scope.Reference[];
25
31
  mapKeyNodeToText(node: TSESTree.Node, sourceCode: Readonly<TSESLint.SourceCode>): string;
32
+ getReactComponentOrHookAncestor(context: Readonly<RuleContext<string, readonly unknown[]>>): TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | undefined;
26
33
  getReferencedExpressionByIdentifier(params: {
27
34
  node: TSESTree.Node;
28
35
  context: Readonly<RuleContext<string, readonly unknown[]>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/eslint-plugin-query",
3
- "version": "4.26.2",
3
+ "version": "4.28.1",
4
4
  "description": "ESLint plugin for TanStack Query",
5
5
  "author": "Eliya Cohen",
6
6
  "license": "MIT",