@tanstack/eslint-plugin-query 4.34.1 → 4.36.0

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,5 +1,6 @@
1
1
  export declare const rules: {
2
2
  "exhaustive-deps": import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<string, readonly unknown[], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
3
3
  "prefer-query-object-syntax": import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"preferObjectSyntax" | "returnTypeAreNotObjectSyntax", readonly unknown[], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
4
+ "stable-query-client": import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<string, readonly unknown[], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
4
5
  };
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
+ export declare const name = "stable-query-client";
3
+ export declare const rule: TSESLint.RuleModule<string, readonly unknown[], TSESLint.RuleListener>;
4
+ //# sourceMappingURL=stable-query-client.rule.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=stable-query-client.test.d.ts.map
@@ -29,12 +29,17 @@ export declare const ASTUtils: {
29
29
  node: TSESTree.Node;
30
30
  }): TSESLint.Scope.Reference[];
31
31
  mapKeyNodeToText(node: TSESTree.Node, sourceCode: Readonly<TSESLint.SourceCode>): string;
32
- isValidReactComponentOrHookName(identifier: TSESTree.Identifier | null): boolean;
33
- getFunctionAncestor(context: Readonly<RuleContext<string, readonly unknown[]>>): TSESTree.Node | undefined;
32
+ isValidReactComponentOrHookName(identifier: TSESTree.Identifier | null | undefined): boolean;
33
+ getFunctionAncestor(context: Readonly<RuleContext<string, readonly unknown[]>>): TSESTree.FunctionDeclarationWithOptionalName | (TSESTree.ArrowFunctionExpression & {
34
+ type: AST_NODE_TYPES.ArrowFunctionExpression | AST_NODE_TYPES.FunctionDeclaration | AST_NODE_TYPES.FunctionExpression;
35
+ }) | (TSESTree.FunctionExpression & {
36
+ type: AST_NODE_TYPES.ArrowFunctionExpression | AST_NODE_TYPES.FunctionDeclaration | AST_NODE_TYPES.FunctionExpression;
37
+ }) | undefined;
34
38
  getReferencedExpressionByIdentifier(params: {
35
39
  node: TSESTree.Node;
36
40
  context: Readonly<RuleContext<string, readonly unknown[]>>;
37
41
  }): TSESTree.Expression | null;
42
+ getClosestVariableDeclarator(node: TSESTree.Node): TSESTree.VariableDeclarator | undefined;
38
43
  getNestedReturnStatements(node: TSESTree.Node): TSESTree.ReturnStatement[];
39
44
  };
40
45
  //# sourceMappingURL=ast-utils.d.ts.map
@@ -1,8 +1,10 @@
1
- import type { ESLintUtils, TSESTree } from '@typescript-eslint/utils';
1
+ import { TSESTree } from '@typescript-eslint/utils';
2
+ import type { ESLintUtils } from '@typescript-eslint/utils';
2
3
  declare type Create = Parameters<ReturnType<typeof ESLintUtils.RuleCreator>>[0]['create'];
3
4
  declare type Context = Parameters<Create>[0];
4
5
  declare type Options = Parameters<Create>[1];
5
6
  declare type Helpers = {
7
+ isSpecificTanstackQueryImport: (node: TSESTree.Identifier, source: string) => boolean;
6
8
  isTanstackQueryImport: (node: TSESTree.Identifier) => boolean;
7
9
  };
8
10
  export declare type EnhancedCreate = (context: Context, options: Options, helpers: Helpers) => ReturnType<Create>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/eslint-plugin-query",
3
- "version": "4.34.1",
3
+ "version": "4.36.0",
4
4
  "description": "ESLint plugin for TanStack Query",
5
5
  "author": "Eliya Cohen",
6
6
  "license": "MIT",