@r_masseater/oxlint-typed-rules 0.1.2 → 0.1.3
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.
- package/LICENSE +258 -0
- package/README.md +23 -0
- package/dist/config-rules-CIyMUUvG.mjs +6 -0
- package/dist/config-rules-CIyMUUvG.mjs.map +1 -0
- package/dist/drizzle.d.mts +5 -0
- package/dist/drizzle.mjs +232 -0
- package/dist/drizzle.mjs.map +1 -0
- package/dist/eslint-utils-DauzR3x9.mjs +489 -0
- package/dist/eslint-utils-DauzR3x9.mjs.map +1 -0
- package/dist/index.d.mts +12 -1
- package/dist/index.mjs +1 -1
- package/dist/react.d.mts +4 -2
- package/dist/react.mjs +9 -301
- package/dist/react.mjs.map +1 -1
- package/dist/rolldown-runtime-DQp2zzRu.mjs +41 -0
- package/dist/tanstack-query.d.mts +5 -0
- package/dist/tanstack-query.mjs +1379 -0
- package/dist/tanstack-query.mjs.map +1 -0
- package/dist/tanstack-router.d.mts +5 -0
- package/dist/tanstack-router.mjs +344 -0
- package/dist/tanstack-router.mjs.map +1 -0
- package/dist/tanstack-start.mjs +6 -4
- package/dist/tanstack-start.mjs.map +1 -1
- package/dist/ts-compat-kqrVqnFj.mjs +132 -0
- package/dist/ts-compat-kqrVqnFj.mjs.map +1 -0
- package/dist/{typed-rule-D8jasU_z.mjs → typed-rule-DsbM82SI.mjs} +20 -4
- package/dist/typed-rule-DsbM82SI.mjs.map +1 -0
- package/dist/typescript-eslint-utils-QnYasB-9.mjs +16 -0
- package/dist/typescript-eslint-utils-QnYasB-9.mjs.map +1 -0
- package/dist/upstream-plugin-DqJEA6iy.mjs +20 -0
- package/dist/upstream-plugin-DqJEA6iy.mjs.map +1 -0
- package/dist/upstream-plugin-xn91RvOJ.d.mts +15 -0
- package/package.json +43 -5
- package/dist/eslint-utils-CTNWAzIf.mjs +0 -352
- package/dist/eslint-utils-CTNWAzIf.mjs.map +0 -1
- package/dist/typed-rule-D8jasU_z.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstack-query.mjs","names":["AST_NODE_TYPES","TSESTree","ESLintUtils","plugin","tanstackQuery"],"sources":["../../../node_modules/.pnpm/@tanstack+eslint-plugin-query@5.105.3_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__su_d952cca362d1d08c5aa1aaa1487f168b/node_modules/@tanstack/eslint-plugin-query/build/modern/rules-D9GziSYo.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-query@5.105.3_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__su_d952cca362d1d08c5aa1aaa1487f168b/node_modules/@tanstack/eslint-plugin-query/build/modern/index.js","../src/tanstack-query.ts"],"sourcesContent":["import { AST_NODE_TYPES, ESLintUtils, TSESTree } from \"@typescript-eslint/utils\";\n// src/utils/unique-by.ts\n/**\n* Removes duplicate items, keeping the first item for each key.\n* @param arr - The items.\n* @param fn - Returns the key that identifies an item.\n* @returns The items with unique keys, in their original order.\n*/\nfunction uniqueBy(arr, fn) {\n\treturn arr.filter((x, i, a) => a.findIndex((y) => fn(x) === fn(y)) === i);\n}\n// src/utils/ast-utils.ts\nconst ASTUtils = {\n\tisNodeOfOneOf(node, types) {\n\t\treturn types.includes(node.type);\n\t},\n\tisIdentifier(node) {\n\t\treturn node.type === AST_NODE_TYPES.Identifier;\n\t},\n\tisIdentifierWithName(node, name) {\n\t\treturn ASTUtils.isIdentifier(node) && node.name === name;\n\t},\n\tisIdentifierWithOneOfNames(node, name) {\n\t\treturn ASTUtils.isIdentifier(node) && name.includes(node.name);\n\t},\n\tisProperty(node) {\n\t\treturn node.type === AST_NODE_TYPES.Property;\n\t},\n\tisObjectExpression(node) {\n\t\treturn node.type === AST_NODE_TYPES.ObjectExpression;\n\t},\n\tisPropertyWithIdentifierKey(node, key) {\n\t\treturn ASTUtils.isProperty(node) && ASTUtils.isIdentifierWithName(node.key, key);\n\t},\n\tfindPropertyWithIdentifierKey(properties, key) {\n\t\treturn properties.find((x) => ASTUtils.isPropertyWithIdentifierKey(x, key));\n\t},\n\ttraverseUpOnly(identifier, allowedNodeTypes) {\n\t\tconst parent = identifier.parent;\n\t\tif (parent !== void 0 && allowedNodeTypes.includes(parent.type)) return ASTUtils.traverseUpOnly(parent, allowedNodeTypes);\n\t\treturn identifier;\n\t},\n\ttraverseUpMemberExpression(node) {\n\t\tconst parent = node.parent;\n\t\tif (parent !== void 0 && (parent.type === AST_NODE_TYPES.MemberExpression && parent.object === node || parent.type === AST_NODE_TYPES.ChainExpression || parent.type === AST_NODE_TYPES.TSNonNullExpression)) return ASTUtils.traverseUpMemberExpression(parent);\n\t\treturn node;\n\t},\n\tisDeclaredInNode(params) {\n\t\tconst { functionNode, reference, scopeManager } = params;\n\t\tconst scope = scopeManager.acquire(functionNode);\n\t\tif (scope === null) return false;\n\t\treturn scope.set.has(reference.identifier.name);\n\t},\n\tgetExternalRefs(params) {\n\t\tconst { scopeManager, sourceCode, node } = params;\n\t\tconst scope = scopeManager.acquire(node);\n\t\tif (scope === null) return [];\n\t\tconst collectReferences = (currentScope) => {\n\t\t\tconst references = [...currentScope.references];\n\t\t\tfor (const childScope of currentScope.childScopes) references.push(...collectReferences(childScope));\n\t\t\treturn references;\n\t\t};\n\t\tconst references = collectReferences(scope).filter((x) => x.isRead() && !scope.set.has(x.identifier.name)).map((x) => {\n\t\t\tconst memberPath = ASTUtils.traverseUpMemberExpression(x.identifier);\n\t\t\tconst memberExpression = memberPath.parent;\n\t\t\tconst referenceNode = memberExpression !== void 0 && memberExpression.type === AST_NODE_TYPES.MemberExpression && memberExpression.computed && memberExpression.property === memberPath && memberExpression.parent.type === AST_NODE_TYPES.CallExpression && memberExpression.parent.callee === memberExpression ? memberPath : ASTUtils.traverseUpOnly(x.identifier, [AST_NODE_TYPES.MemberExpression, AST_NODE_TYPES.Identifier]);\n\t\t\treturn {\n\t\t\t\tvariable: x,\n\t\t\t\tnode: referenceNode,\n\t\t\t\ttext: sourceCode.getText(referenceNode)\n\t\t\t};\n\t\t});\n\t\tconst localRefIds = new Set([...scope.set.values()].map((x) => sourceCode.getText(x.identifiers[0])));\n\t\treturn uniqueBy(references.filter((x) => x.variable.resolved === null || !localRefIds.has(x.text)), (x) => x.text).map((x) => x.variable);\n\t},\n\tisValidReactComponentOrHookName(identifier) {\n\t\treturn identifier !== null && identifier !== void 0 && /^(use|[A-Z])/.test(identifier.name);\n\t},\n\tgetFunctionAncestor(sourceCode, node) {\n\t\tfor (const ancestor of sourceCode.getAncestors(node)) {\n\t\t\tif (ASTUtils.isNodeOfOneOf(ancestor, [\n\t\t\t\tAST_NODE_TYPES.FunctionDeclaration,\n\t\t\t\tAST_NODE_TYPES.FunctionExpression,\n\t\t\t\tAST_NODE_TYPES.ArrowFunctionExpression\n\t\t\t])) return ancestor;\n\t\t\tif (ancestor.parent?.type === AST_NODE_TYPES.VariableDeclarator && ancestor.parent.id.type === AST_NODE_TYPES.Identifier && ASTUtils.isNodeOfOneOf(ancestor, [\n\t\t\t\tAST_NODE_TYPES.FunctionDeclaration,\n\t\t\t\tAST_NODE_TYPES.FunctionExpression,\n\t\t\t\tAST_NODE_TYPES.ArrowFunctionExpression\n\t\t\t])) return ancestor;\n\t\t}\n\t},\n\tgetReferencedExpressionByIdentifier(params) {\n\t\tconst { node, context } = params;\n\t\tconst sourceCode = context.sourceCode ?? context.getSourceCode();\n\t\tconst resolvedNode = (context.sourceCode.getScope(node) ? sourceCode.getScope(node) : context.getScope()).references.find((ref) => ref.identifier === node)?.resolved?.defs[0]?.node;\n\t\tif (resolvedNode?.type !== AST_NODE_TYPES.VariableDeclarator) return null;\n\t\treturn resolvedNode.init;\n\t}\n};\n// src/utils/get-docs-url.ts\n/**\n* Builds the URL of a rule's documentation page.\n* @param ruleName - The rule's name, e.g. `exhaustive-deps`.\n* @returns The URL of the rule's page in the ESLint plugin docs.\n*/\nconst getDocsUrl = (ruleName) => `https://tanstack.com/query/latest/docs/eslint/${ruleName}`;\n// src/utils/detect-react-query-imports.ts\n/**\n* Wraps a rule's `create` function to track the identifiers imported from TanStack Query packages,\n* and passes helpers that check them.\n* @param create - The rule's `create` function, which also receives the helpers.\n* @returns The wrapped `create` function.\n*/\nfunction detectTanstackQueryImports(create) {\n\treturn (context, optionsWithDefault) => {\n\t\tconst tanstackQueryImportSpecifiers = [];\n\t\tconst helpers = {\n\t\t\tisSpecificTanstackQueryImport(node, source) {\n\t\t\t\treturn !!tanstackQueryImportSpecifiers.find((specifier) => {\n\t\t\t\t\tif (specifier.type === TSESTree.AST_NODE_TYPES.ImportSpecifier && specifier.parent.type === TSESTree.AST_NODE_TYPES.ImportDeclaration && specifier.parent.source.value === source) return node.name === specifier.local.name;\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t},\n\t\t\tisTanstackQueryImport(node) {\n\t\t\t\treturn !!tanstackQueryImportSpecifiers.find((specifier) => {\n\t\t\t\t\tif (specifier.type === TSESTree.AST_NODE_TYPES.ImportSpecifier) return node.name === specifier.local.name;\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\tconst detectionInstructions = { ImportDeclaration(node) {\n\t\t\tif (node.specifiers.length > 0 && (node.importKind === \"value\" || node.importKind === void 0) && node.source.value.startsWith(\"@tanstack/\") && node.source.value.endsWith(\"-query\")) tanstackQueryImportSpecifiers.push(...node.specifiers);\n\t\t} };\n\t\tconst ruleInstructions = create(context, optionsWithDefault, helpers);\n\t\tconst enhancedRuleInstructions = {};\n\t\tnew Set(Object.keys(detectionInstructions).concat(Object.keys(ruleInstructions))).forEach((instruction) => {\n\t\t\tenhancedRuleInstructions[instruction] = (node) => {\n\t\t\t\tif (instruction in detectionInstructions) detectionInstructions[instruction]?.(node);\n\t\t\t\tconst ruleInstruction = ruleInstructions[instruction];\n\t\t\t\tif (ruleInstruction) return ruleInstruction(node);\n\t\t\t};\n\t\t});\n\t\treturn enhancedRuleInstructions;\n\t};\n}\n// src/rules/exhaustive-deps/exhaustive-deps.utils.ts\nconst ExhaustiveDepsUtils = {\n\tisRelevantReference(params) {\n\t\tconst { sourceCode, reference, scopeManager, node, filename } = params;\n\t\tconst component = ASTUtils.getFunctionAncestor(sourceCode, node);\n\t\tconst queryFnScope = scopeManager.acquire(node);\n\t\tif (queryFnScope === null || reference.isValueReference === false) return false;\n\t\tlet currentScope = reference.resolved?.scope ?? null;\n\t\twhile (currentScope !== null) {\n\t\t\tif (currentScope === queryFnScope) return false;\n\t\t\tcurrentScope = currentScope.upper;\n\t\t}\n\t\tif (component !== void 0) {\n\t\t\tif (!ASTUtils.isDeclaredInNode({\n\t\t\t\tscopeManager,\n\t\t\t\treference,\n\t\t\t\tfunctionNode: component\n\t\t\t})) return false;\n\t\t} else {\n\t\t\tif (!filename.endsWith(\".vue\")) return false;\n\t\t\tconst definition = reference.resolved?.defs[0];\n\t\t\tconst isGlobalVariable = definition === void 0;\n\t\t\tconst isImport = definition?.type === \"ImportBinding\";\n\t\t\tif (isGlobalVariable || isImport) return false;\n\t\t}\n\t\treturn reference.identifier.name !== \"undefined\" && !ExhaustiveDepsUtils.isFunctionCallTarget(reference.identifier) && reference.identifier.parent.type !== AST_NODE_TYPES.NewExpression && !ExhaustiveDepsUtils.isInstanceOfKind(reference.identifier.parent);\n\t},\n\tisFunctionCallTarget(identifier) {\n\t\tconst callee = ASTUtils.traverseUpMemberExpression(identifier);\n\t\treturn callee.parent !== void 0 && callee.parent.type === AST_NODE_TYPES.CallExpression && callee.parent.callee === callee;\n\t},\n\t/**\n\t* Given required refs and existing queryKey entries, compute missing dependency paths\n\t* respecting allowlisted variables and types.\n\t* @param params - The references the query function needs, the allowlisted variables, and the\n\t* root identifiers and full paths already in the query key.\n\t* @returns The missing dependency paths, without paths whose root is already missing.\n\t*/\n\tcomputeFilteredMissingPaths(params) {\n\t\tconst { requiredRefs, allowlistedVariables, existingRootIdentifiers, existingFullPaths } = params;\n\t\tconst missingPaths = /* @__PURE__ */ new Set();\n\t\tfor (const { root, path, allowlistedByType } of requiredRefs) {\n\t\t\tif (existingRootIdentifiers.has(root)) continue;\n\t\t\tif (allowlistedVariables.has(root)) continue;\n\t\t\tif (existingFullPaths.has(path)) continue;\n\t\t\tif (allowlistedByType) continue;\n\t\t\tmissingPaths.add(path);\n\t\t}\n\t\tfor (const path of missingPaths) {\n\t\t\tconst root = path.split(\".\")[0];\n\t\t\tif (root !== path && root !== void 0 && missingPaths.has(root)) missingPaths.delete(path);\n\t\t}\n\t\treturn Array.from(missingPaths);\n\t},\n\t/**\n\t* Extract existing queryKey deps as root identifiers and full member paths.\n\t* @param params - The source code, the scope manager, and the query key node to scan.\n\t* @returns The root identifiers that cover all of their members, and every dependency path.\n\t*/\n\tcollectQueryKeyDeps(params) {\n\t\tconst { sourceCode, scopeManager, queryKeyNode } = params;\n\t\tconst roots = /* @__PURE__ */ new Set();\n\t\tconst paths = /* @__PURE__ */ new Set();\n\t\tconst visitorKeys = sourceCode.visitorKeys;\n\t\t/**\n\t\t* Records an identifier that covers all of its members.\n\t\t* @param name - The identifier, normalized before it is recorded.\n\t\t*/\n\t\tfunction addRoot(name) {\n\t\t\tconst cleaned = ExhaustiveDepsUtils.normalizeChain(name);\n\t\t\troots.add(cleaned);\n\t\t\tpaths.add(cleaned);\n\t\t}\n\t\t/**\n\t\t* Records a full member path.\n\t\t* @param text - The path, normalized before it is recorded.\n\t\t*/\n\t\tfunction addFull(text) {\n\t\t\tconst cleaned = ExhaustiveDepsUtils.normalizeChain(text);\n\t\t\tpaths.add(cleaned);\n\t\t}\n\t\t/**\n\t\t* Records a computed reference path as a root or a full path.\n\t\t* @param refPath - The reference path, or `null` to record nothing.\n\t\t*/\n\t\tfunction addRefPath(refPath) {\n\t\t\tif (!refPath) return;\n\t\t\tif (refPath.coversRootMembers) {\n\t\t\t\taddRoot(refPath.root);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\taddFull(refPath.path);\n\t\t}\n\t\t/**\n\t\t* Visits every child node of a node.\n\t\t* @param node - The node whose children are visited.\n\t\t*/\n\t\tfunction visitChildren(node) {\n\t\t\tconst keys = visitorKeys[node.type] ?? [];\n\t\t\tfor (const key of keys) {\n\t\t\t\tconst value = node[key];\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\tfor (const item of value) if (ExhaustiveDepsUtils.isNode(item)) visit(item);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (ExhaustiveDepsUtils.isNode(value)) visit(value);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Records the dependencies of a node: identifiers directly, and the external references of\n\t\t* functions. Other nodes are visited recursively.\n\t\t* @param node - The node to visit.\n\t\t*/\n\t\tfunction visit(node) {\n\t\t\tif (!node) return;\n\t\t\tswitch (node.type) {\n\t\t\t\tcase AST_NODE_TYPES.Identifier:\n\t\t\t\t\taddRefPath(ExhaustiveDepsUtils.computeRefPath({\n\t\t\t\t\t\tidentifier: node,\n\t\t\t\t\t\tsourceCode\n\t\t\t\t\t}));\n\t\t\t\t\treturn;\n\t\t\t\tcase AST_NODE_TYPES.ArrowFunctionExpression:\n\t\t\t\tcase AST_NODE_TYPES.FunctionExpression:\n\t\t\t\t\tfor (const reference of ExhaustiveDepsUtils.collectExternalRefsInFunction({\n\t\t\t\t\t\tfunctionNode: node,\n\t\t\t\t\t\tscopeManager\n\t\t\t\t\t})) {\n\t\t\t\t\t\tif (reference.identifier.type !== AST_NODE_TYPES.Identifier) continue;\n\t\t\t\t\t\taddRefPath(ExhaustiveDepsUtils.computeRefPath({\n\t\t\t\t\t\t\tidentifier: reference.identifier,\n\t\t\t\t\t\t\tsourceCode\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\tcase AST_NODE_TYPES.Property:\n\t\t\t\t\tvisit(node.value);\n\t\t\t\t\treturn;\n\t\t\t\tcase AST_NODE_TYPES.MemberExpression:\n\t\t\t\t\tif (node.parent.type === AST_NODE_TYPES.CallExpression && node.parent.callee === node && node.object.type === AST_NODE_TYPES.Identifier) addRoot(node.object.name);\n\t\t\t\t\telse visit(node.object);\n\t\t\t\t\treturn;\n\t\t\t\tcase AST_NODE_TYPES.CallExpression:\n\t\t\t\t\tnode.arguments.forEach((argument) => visit(argument));\n\t\t\t\t\tswitch (node.callee.type) {\n\t\t\t\t\t\tcase AST_NODE_TYPES.Identifier:\n\t\t\t\t\t\tcase AST_NODE_TYPES.MemberExpression:\n\t\t\t\t\t\tcase AST_NODE_TYPES.ChainExpression:\n\t\t\t\t\t\tcase AST_NODE_TYPES.TSNonNullExpression: visit(node.callee);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t\tvisitChildren(node);\n\t\t}\n\t\tvisit(queryKeyNode);\n\t\treturn {\n\t\t\troots,\n\t\t\tpaths\n\t\t};\n\t},\n\tisNode(value) {\n\t\treturn typeof value === \"object\" && value !== null && \"type\" in value && typeof value.type === \"string\";\n\t},\n\t/**\n\t* Checks whether the resolved variable is allowlisted by its type annotation.\n\t* @param params - The allowlisted type names, and the variable to check.\n\t* @returns `true` if a type referenced in the variable's type annotation is allowlisted.\n\t*/\n\tvariableIsAllowlistedByType(params) {\n\t\tconst { allowlistedTypes, variable } = params;\n\t\tif (allowlistedTypes.size === 0) return false;\n\t\tif (!variable) return false;\n\t\tfor (const id of variable.identifiers) if (id.typeAnnotation) {\n\t\t\tconst typeIdentifiers = /* @__PURE__ */ new Set();\n\t\t\tExhaustiveDepsUtils.collectTypeIdentifiers(id.typeAnnotation.typeAnnotation, typeIdentifiers);\n\t\t\tfor (const typeIdentifier of typeIdentifiers) if (allowlistedTypes.has(typeIdentifier)) return true;\n\t\t}\n\t\treturn false;\n\t},\n\tisInstanceOfKind(node) {\n\t\treturn node.type === AST_NODE_TYPES.BinaryExpression && node.operator === \"instanceof\";\n\t},\n\t/**\n\t* Normalizes a chain by removing optional chaining operators\n\t*\n\t* Example: `a?.b.c!` -> `a.b.c`\n\t* @param text - The source text of the chain.\n\t* @returns The chain without optional chaining, non-null assertions, and whitespace.\n\t*/\n\tnormalizeChain(text) {\n\t\treturn text.replace(/(?:\\?(\\.)|!)/g, \"$1\").replace(/\\s+/g, \"\");\n\t},\n\t/**\n\t* Computes the reference path for an identifier\n\t*\n\t* Example: `a.b.c!` -> `{ path: 'a.b.c', root: 'a' }`\n\t* @param params - The identifier, and the source code to read the chain from.\n\t* @returns The dependency `path`, its `root`, and whether the path is the root itself and covers\n\t* all of its members. For a method call, the method name is dropped from the path.\n\t*/\n\tcomputeRefPath(params) {\n\t\tconst { identifier, sourceCode } = params;\n\t\tconst fullChainNode = ASTUtils.traverseUpMemberExpression(identifier);\n\t\tconst fullText = ExhaustiveDepsUtils.normalizeChain(sourceCode.getText(fullChainNode));\n\t\tconst parent = fullChainNode.parent;\n\t\tlet dependencyPath = fullText;\n\t\tlet coversRootMembers = fullText === identifier.name;\n\t\tif (parent && parent.type === AST_NODE_TYPES.CallExpression && parent.callee === fullChainNode) {\n\t\t\tconst segments = fullText.split(\".\");\n\t\t\tif (segments.length > 1) dependencyPath = segments.slice(0, -1).join(\".\");\n\t\t\tcoversRootMembers = false;\n\t\t}\n\t\tdependencyPath = dependencyPath.split(\".\")[0] === \"\" ? identifier.name : dependencyPath;\n\t\tconst root = dependencyPath.split(\".\")[0];\n\t\treturn {\n\t\t\tpath: dependencyPath,\n\t\t\troot: root ?? identifier.name,\n\t\t\tcoversRootMembers: coversRootMembers && dependencyPath === root\n\t\t};\n\t},\n\tcollectExternalRefsInFunction(params) {\n\t\tconst { functionNode, scopeManager } = params;\n\t\tconst functionScope = scopeManager.acquire(functionNode);\n\t\tif (functionScope === null) return [];\n\t\tconst externalRefs = [];\n\t\t/**\n\t\t* Collects the read references of a scope and its child scopes that resolve to variables\n\t\t* declared outside the function.\n\t\t* @param scope - The scope to collect from.\n\t\t*/\n\t\tfunction collect(scope) {\n\t\t\tfor (const reference of scope.references) {\n\t\t\t\tif (!reference.isRead() || reference.resolved === null) continue;\n\t\t\t\tlet currentScope = reference.resolved.scope;\n\t\t\t\tlet declaredInsideFunction = false;\n\t\t\t\twhile (currentScope !== null) {\n\t\t\t\t\tif (currentScope === functionScope) {\n\t\t\t\t\t\tdeclaredInsideFunction = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcurrentScope = currentScope.upper;\n\t\t\t\t}\n\t\t\t\tif (!declaredInsideFunction) externalRefs.push(reference);\n\t\t\t}\n\t\t\tfor (const childScope of scope.childScopes) collect(childScope);\n\t\t}\n\t\tcollect(functionScope);\n\t\treturn externalRefs;\n\t},\n\t/**\n\t* Recursively collects type identifiers from a type annotation.\n\t* @param typeNode - The type to collect from: type references, unions, intersections, arrays, and\n\t* tuples are handled.\n\t* @param out - The set the type names are added to.\n\t*/\n\tcollectTypeIdentifiers(typeNode, out) {\n\t\tswitch (typeNode.type) {\n\t\t\tcase AST_NODE_TYPES.TSTypeReference:\n\t\t\t\tif (typeNode.typeName.type === AST_NODE_TYPES.Identifier) out.add(typeNode.typeName.name);\n\t\t\t\tbreak;\n\t\t\tcase AST_NODE_TYPES.TSUnionType:\n\t\t\tcase AST_NODE_TYPES.TSIntersectionType:\n\t\t\t\ttypeNode.types.forEach((t) => ExhaustiveDepsUtils.collectTypeIdentifiers(t, out));\n\t\t\t\tbreak;\n\t\t\tcase AST_NODE_TYPES.TSArrayType:\n\t\t\t\tExhaustiveDepsUtils.collectTypeIdentifiers(typeNode.elementType, out);\n\t\t\t\tbreak;\n\t\t\tcase AST_NODE_TYPES.TSTupleType: typeNode.elementTypes.forEach((et) => ExhaustiveDepsUtils.collectTypeIdentifiers(et, out));\n\t\t}\n\t},\n\t/**\n\t* Gets the function expression nodes from a queryFn property, handling conditional expressions.\n\t* When neither branch is skipToken, returns both branches so all deps are scanned.\n\t* @param queryFn - The `queryFn` property.\n\t* @returns The nodes to scan for dependencies.\n\t*/\n\tgetQueryFnNodes(queryFn) {\n\t\tif (queryFn.value.type !== AST_NODE_TYPES.ConditionalExpression) return [queryFn.value];\n\t\tif (queryFn.value.consequent.type === AST_NODE_TYPES.Identifier && queryFn.value.consequent.name === \"skipToken\") return [queryFn.value.alternate];\n\t\tif (queryFn.value.alternate.type === AST_NODE_TYPES.Identifier && queryFn.value.alternate.name === \"skipToken\") return [queryFn.value.consequent];\n\t\treturn [queryFn.value.consequent, queryFn.value.alternate];\n\t}\n};\n// src/rules/exhaustive-deps/exhaustive-deps.rule.ts\nconst QUERY_KEY = \"queryKey\";\nconst QUERY_FN = \"queryFn\";\nconst name$7 = \"exhaustive-deps\";\nconst rule$7 = ESLintUtils.RuleCreator(getDocsUrl)({\n\tname: name$7,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Exhaustive deps rule for useQuery\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tmessages: {\n\t\t\tmissingDeps: `The following dependencies are missing in your queryKey: {{deps}}`,\n\t\t\tfixTo: \"Fix to {{result}}\"\n\t\t},\n\t\thasSuggestions: true,\n\t\tschema: [{\n\t\t\ttype: \"object\",\n\t\t\tproperties: { allowlist: {\n\t\t\t\ttype: \"object\",\n\t\t\t\tproperties: {\n\t\t\t\t\tvariables: {\n\t\t\t\t\t\ttype: \"array\",\n\t\t\t\t\t\titems: { type: \"string\" }\n\t\t\t\t\t},\n\t\t\t\t\ttypes: {\n\t\t\t\t\t\ttype: \"array\",\n\t\t\t\t\t\titems: { type: \"string\" }\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tadditionalProperties: false\n\t\t\t} },\n\t\t\tadditionalProperties: false\n\t\t}]\n\t},\n\tdefaultOptions: [],\n\tcreate: detectTanstackQueryImports((context) => {\n\t\treturn { ObjectExpression: (node) => {\n\t\t\tconst scopeManager = context.sourceCode.scopeManager;\n\t\t\tconst queryKey = ASTUtils.findPropertyWithIdentifierKey(node.properties, QUERY_KEY);\n\t\t\tconst queryFn = ASTUtils.findPropertyWithIdentifierKey(node.properties, QUERY_FN);\n\t\t\tif (scopeManager === null || queryKey === void 0 || queryFn === void 0 || !ASTUtils.isNodeOfOneOf(queryFn.value, [\n\t\t\t\tAST_NODE_TYPES.ArrowFunctionExpression,\n\t\t\t\tAST_NODE_TYPES.FunctionExpression,\n\t\t\t\tAST_NODE_TYPES.ConditionalExpression\n\t\t\t])) return;\n\t\t\tconst queryKeyNode = dereferenceVariablesAndTypeAssertions(queryKey.value, context);\n\t\t\tconst queryFnNodes = ExhaustiveDepsUtils.getQueryFnNodes(queryFn);\n\t\t\tconst relevantRefs = queryFnNodes.flatMap((fnNode) => ASTUtils.getExternalRefs({\n\t\t\t\tscopeManager,\n\t\t\t\tsourceCode: context.sourceCode,\n\t\t\t\tnode: fnNode\n\t\t\t})).filter((reference) => queryFnNodes.some((fnNode) => ExhaustiveDepsUtils.isRelevantReference({\n\t\t\t\tsourceCode: context.sourceCode,\n\t\t\t\treference,\n\t\t\t\tscopeManager,\n\t\t\t\tnode: fnNode,\n\t\t\t\tfilename: context.filename\n\t\t\t})));\n\t\t\tconst ruleOptions = context.options.at(0);\n\t\t\tconst allowlistedVariables = new Set(ruleOptions?.allowlist?.variables ?? []);\n\t\t\tconst allowlistedTypes = new Set(ruleOptions?.allowlist?.types ?? []);\n\t\t\tconst requiredRefs = relevantRefs.flatMap((ref) => {\n\t\t\t\tif (ref.identifier.type !== AST_NODE_TYPES.Identifier) return [];\n\t\t\t\tconst refPath = ExhaustiveDepsUtils.computeRefPath({\n\t\t\t\t\tidentifier: ref.identifier,\n\t\t\t\t\tsourceCode: context.sourceCode\n\t\t\t\t});\n\t\t\t\tif (refPath === null) return [];\n\t\t\t\treturn [{\n\t\t\t\t\t...refPath,\n\t\t\t\t\tallowlistedByType: ExhaustiveDepsUtils.variableIsAllowlistedByType({\n\t\t\t\t\t\tallowlistedTypes,\n\t\t\t\t\t\tvariable: ref.resolved ?? null\n\t\t\t\t\t})\n\t\t\t\t}];\n\t\t\t});\n\t\t\tif (requiredRefs.length === 0) return;\n\t\t\tconst queryKeyDeps = ExhaustiveDepsUtils.collectQueryKeyDeps({\n\t\t\t\tsourceCode: context.sourceCode,\n\t\t\t\tscopeManager,\n\t\t\t\tqueryKeyNode\n\t\t\t});\n\t\t\tconst missingPaths = ExhaustiveDepsUtils.computeFilteredMissingPaths({\n\t\t\t\trequiredRefs,\n\t\t\t\tallowlistedVariables,\n\t\t\t\texistingRootIdentifiers: queryKeyDeps.roots,\n\t\t\t\texistingFullPaths: queryKeyDeps.paths\n\t\t\t});\n\t\t\tif (missingPaths.length === 0) return;\n\t\t\tconst missingAsText = missingPaths.join(\", \");\n\t\t\tconst suggestions = buildSuggestions({\n\t\t\t\tqueryKeyNode,\n\t\t\t\tmissingPaths,\n\t\t\t\tmissingAsText,\n\t\t\t\tsourceCode: context.sourceCode\n\t\t\t});\n\t\t\tcontext.report({\n\t\t\t\tnode,\n\t\t\t\tmessageId: \"missingDeps\",\n\t\t\t\tdata: { deps: missingAsText },\n\t\t\t\tsuggest: suggestions\n\t\t\t});\n\t\t} };\n\t})\n});\n/**\n* Builds the suggestion that adds the missing dependencies to an array query key.\n* @param params - The query key node, the missing paths and their text, and the source code.\n* @returns The suggestion, or none if the query key is not an array literal.\n*/\nfunction buildSuggestions(params) {\n\tconst { queryKeyNode, missingPaths, missingAsText, sourceCode } = params;\n\tif (queryKeyNode.type !== AST_NODE_TYPES.ArrayExpression) return [];\n\tconst closingBracket = sourceCode.getLastToken(queryKeyNode);\n\tif (!closingBracket) return [];\n\tconst resultText = `[${[...queryKeyNode.elements.filter((el) => el !== null).map((el) => sourceCode.getText(el)), ...missingPaths].join(\", \")}]`;\n\tif (queryKeyNode.elements.length === 0) return [{\n\t\tmessageId: \"fixTo\",\n\t\tdata: { result: resultText },\n\t\tfix: (fixer) => fixer.replaceText(queryKeyNode, resultText)\n\t}];\n\tconst separator = sourceCode.getTokenBefore(closingBracket)?.value === \",\" ? \" \" : \", \";\n\treturn [{\n\t\tmessageId: \"fixTo\",\n\t\tdata: { result: resultText },\n\t\tfix: (fixer) => fixer.insertTextBefore(closingBracket, `${separator}${missingAsText}`)\n\t}];\n}\n/**\n* Follows variable references and `as` assertions from a query key node to the expression it comes\n* from.\n* @param queryKeyNode - The query key node to start from.\n* @param context - The rule context, used to resolve variables.\n* @returns The innermost node that is neither a resolvable variable nor an `as` assertion.\n*/\nfunction dereferenceVariablesAndTypeAssertions(queryKeyNode, context) {\n\tconst visitedNodes = /* @__PURE__ */ new Set();\n\tfor (let i = 0; i < 256; ++i) {\n\t\tif (visitedNodes.has(queryKeyNode)) return queryKeyNode;\n\t\tvisitedNodes.add(queryKeyNode);\n\t\tswitch (queryKeyNode.type) {\n\t\t\tcase AST_NODE_TYPES.TSAsExpression:\n\t\t\t\tqueryKeyNode = queryKeyNode.expression;\n\t\t\t\tbreak;\n\t\t\tcase AST_NODE_TYPES.Identifier: {\n\t\t\t\tconst expression = ASTUtils.getReferencedExpressionByIdentifier({\n\t\t\t\t\tcontext,\n\t\t\t\t\tnode: queryKeyNode\n\t\t\t\t});\n\t\t\t\tif (expression == null) return queryKeyNode;\n\t\t\t\tqueryKeyNode = expression;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: return queryKeyNode;\n\t\t}\n\t}\n\treturn queryKeyNode;\n}\n// src/rules/stable-query-client/stable-query-client.rule.ts\nconst name$6 = \"stable-query-client\";\nconst rule$6 = ESLintUtils.RuleCreator(getDocsUrl)({\n\tname: name$6,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Makes sure that QueryClient is stable\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tmessages: {\n\t\t\tunstable: [\"QueryClient is not stable. It should be either extracted from the component or wrapped in React.useState.\", \"See https://tkdodo.eu/blog/react-query-fa-qs#2-the-queryclient-is-not-stable\"].join(\"\\n\"),\n\t\t\tfixTo: \"Fix to {{result}}\"\n\t\t},\n\t\thasSuggestions: true,\n\t\tfixable: \"code\",\n\t\tschema: []\n\t},\n\tdefaultOptions: [],\n\tcreate: detectTanstackQueryImports((context, _, helpers) => {\n\t\treturn { NewExpression: (node) => {\n\t\t\tif (node.callee.type !== AST_NODE_TYPES.Identifier || node.callee.name !== \"QueryClient\" || !helpers.isSpecificTanstackQueryImport(node.callee, \"@tanstack/react-query\")) return;\n\t\t\tconst fnAncestor = context.sourceCode.getAncestors(node).reverse().find((ancestor) => ASTUtils.isNodeOfOneOf(ancestor, [\n\t\t\t\tAST_NODE_TYPES.FunctionDeclaration,\n\t\t\t\tAST_NODE_TYPES.FunctionExpression,\n\t\t\t\tAST_NODE_TYPES.ArrowFunctionExpression\n\t\t\t]));\n\t\t\tconst fnName = fnAncestor?.parent.type === AST_NODE_TYPES.VariableDeclarator && fnAncestor.parent.id.type === AST_NODE_TYPES.Identifier ? fnAncestor.parent.id : fnAncestor?.id;\n\t\t\tconst isReactServerComponent = fnAncestor?.async === true;\n\t\t\tif (!ASTUtils.isValidReactComponentOrHookName(fnName) || isReactServerComponent) return;\n\t\t\tcontext.report({\n\t\t\t\tnode: node.parent.type === AST_NODE_TYPES.VariableDeclarator ? node.parent : node,\n\t\t\t\tmessageId: \"unstable\",\n\t\t\t\tfix: (() => {\n\t\t\t\t\tconst { parent } = node;\n\t\t\t\t\tif (parent.type !== AST_NODE_TYPES.VariableDeclarator || parent.id.type !== AST_NODE_TYPES.Identifier) return;\n\t\t\t\t\tconst nodeText = (context.sourceCode ?? context.getSourceCode()).getText(node);\n\t\t\t\t\tconst variableName = parent.id.name;\n\t\t\t\t\treturn (fixer) => {\n\t\t\t\t\t\treturn fixer.replaceTextRange([parent.range[0], parent.range[1]], `[${variableName}] = React.useState(() => ${nodeText})`);\n\t\t\t\t\t};\n\t\t\t\t})()\n\t\t\t});\n\t\t} };\n\t})\n});\n// src/rules/no-rest-destructuring/no-rest-destructuring.utils.ts\nconst QUERY_RESULT_TYPE_NAMES = /* @__PURE__ */ new Set([\n\t\"UseBaseQueryResult\",\n\t\"UseQueryResult\",\n\t\"UseSuspenseQueryResult\",\n\t\"DefinedUseQueryResult\",\n\t\"UseInfiniteQueryResult\",\n\t\"UseSuspenseInfiniteQueryResult\",\n\t\"DefinedUseInfiniteQueryResult\",\n\t\"QueryObserverResult\",\n\t\"InfiniteQueryObserverResult\"\n]);\n/**\n* Checks whether a type is one of the query result types, or a union that contains one.\n* @param type - The type to check.\n* @returns `true` if the type's alias or symbol name is a known query result type.\n*/\nfunction isQueryResultType(type) {\n\tif (type.aliasSymbol && QUERY_RESULT_TYPE_NAMES.has(type.aliasSymbol.name)) return true;\n\tconst symbol = type.getSymbol();\n\tif (symbol && QUERY_RESULT_TYPE_NAMES.has(symbol.name)) return true;\n\treturn type.isUnion() && type.types.some(isQueryResultType);\n}\nconst NoRestDestructuringUtils = {\n\tisObjectRestDestructuring(node) {\n\t\tif (node.type !== AST_NODE_TYPES.ObjectPattern) return false;\n\t\treturn node.properties.some((p) => p.type === AST_NODE_TYPES.RestElement);\n\t},\n\tisQueryResultCall(node, parserServices) {\n\t\tif (!parserServices?.program || !parserServices.esTreeNodeToTSNodeMap) return false;\n\t\tconst checker = parserServices.program.getTypeChecker();\n\t\tconst tsNode = parserServices.esTreeNodeToTSNodeMap.get(node.callee);\n\t\treturn checker.getTypeAtLocation(tsNode).getCallSignatures().some((sig) => isQueryResultType(sig.getReturnType()));\n\t}\n};\n// src/rules/no-rest-destructuring/no-rest-destructuring.rule.ts\nconst name$5 = \"no-rest-destructuring\";\nconst queryHooks$1 = [\n\t\"useQuery\",\n\t\"useQueries\",\n\t\"useInfiniteQuery\",\n\t\"useSuspenseQuery\",\n\t\"useSuspenseQueries\",\n\t\"useSuspenseInfiniteQuery\"\n];\nconst rule$5 = ESLintUtils.RuleCreator(getDocsUrl)({\n\tname: name$5,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Disallows rest destructuring in queries\",\n\t\t\trecommended: \"warn\"\n\t\t},\n\t\tmessages: { objectRestDestructure: `Object rest destructuring on a query will observe all changes to the query, leading to excessive re-renders.` },\n\t\tschema: []\n\t},\n\tdefaultOptions: [],\n\tcreate: detectTanstackQueryImports((context, _, helpers) => {\n\t\tconst queryResultVariables = /* @__PURE__ */ new Set();\n\t\treturn {\n\t\t\tCallExpression: (node) => {\n\t\t\t\tif (node.parent.type !== AST_NODE_TYPES.VariableDeclarator) return;\n\t\t\t\tconst returnValue = node.parent.id;\n\t\t\t\tif (!(ASTUtils.isIdentifierWithOneOfNames(node.callee, queryHooks$1) && helpers.isTanstackQueryImport(node.callee))) {\n\t\t\t\t\tif (!(returnValue.type === AST_NODE_TYPES.Identifier || NoRestDestructuringUtils.isObjectRestDestructuring(returnValue)) || !NoRestDestructuringUtils.isQueryResultCall(node, context.sourceCode.parserServices)) return;\n\t\t\t\t}\n\t\t\t\tconst calleeName = ASTUtils.isIdentifier(node.callee) ? node.callee.name : null;\n\t\t\t\tif (calleeName !== \"useQueries\" && calleeName !== \"useSuspenseQueries\") {\n\t\t\t\t\tif (NoRestDestructuringUtils.isObjectRestDestructuring(returnValue)) return context.report({\n\t\t\t\t\t\tnode: node.parent,\n\t\t\t\t\t\tmessageId: \"objectRestDestructure\"\n\t\t\t\t\t});\n\t\t\t\t\tif (returnValue.type === AST_NODE_TYPES.Identifier) queryResultVariables.add(returnValue.name);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (returnValue.type !== AST_NODE_TYPES.ArrayPattern) {\n\t\t\t\t\tif (returnValue.type === AST_NODE_TYPES.Identifier) queryResultVariables.add(returnValue.name);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturnValue.elements.forEach((queryResult) => {\n\t\t\t\t\tif (queryResult === null) return;\n\t\t\t\t\tif (NoRestDestructuringUtils.isObjectRestDestructuring(queryResult)) context.report({\n\t\t\t\t\t\tnode: queryResult,\n\t\t\t\t\t\tmessageId: \"objectRestDestructure\"\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t},\n\t\t\tVariableDeclarator: (node) => {\n\t\t\t\tif (node.init?.type === AST_NODE_TYPES.Identifier && queryResultVariables.has(node.init.name) && NoRestDestructuringUtils.isObjectRestDestructuring(node.id)) context.report({\n\t\t\t\t\tnode,\n\t\t\t\t\tmessageId: \"objectRestDestructure\"\n\t\t\t\t});\n\t\t\t},\n\t\t\tSpreadElement: (node) => {\n\t\t\t\tif (node.argument.type === AST_NODE_TYPES.Identifier && queryResultVariables.has(node.argument.name)) context.report({\n\t\t\t\t\tnode,\n\t\t\t\t\tmessageId: \"objectRestDestructure\"\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t})\n});\n// src/rules/no-unstable-deps/no-unstable-deps.rule.ts\nconst name$4 = \"no-unstable-deps\";\nconst reactHookNames = [\n\t\"useEffect\",\n\t\"useCallback\",\n\t\"useMemo\"\n];\nconst allHookNames = [\"useMutation\", ...[\n\t\"useQuery\",\n\t\"useSuspenseQuery\",\n\t\"useQueries\",\n\t\"useSuspenseQueries\",\n\t\"useInfiniteQuery\",\n\t\"useSuspenseInfiniteQuery\"\n]];\nconst rule$4 = ESLintUtils.RuleCreator(getDocsUrl)({\n\tname: name$4,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Disallow putting the result of query hooks directly in a React hook dependency array\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tmessages: { noUnstableDeps: `The result of {{queryHook}} is not referentially stable, so don't pass it directly into the dependencies array of {{reactHook}}. Instead, destructure the return value of {{queryHook}} and pass the destructured values into the dependency array of {{reactHook}}.` },\n\t\tschema: []\n\t},\n\tdefaultOptions: [],\n\tcreate: detectTanstackQueryImports((context, _options, helpers) => {\n\t\tconst trackedVariables = Object.create(null);\n\t\tconst trackedCustomHooks = Object.create(null);\n\t\tconst hookAliasMap = Object.create(null);\n\t\tconst pendingVariableDeclarators = [];\n\t\tconst pendingDependencyChecks = [];\n\t\t/**\n\t\t* Returns the name of the React hook a call expression calls, if it is one: a known hook, an\n\t\t* alias of one, or `React.<hook>`.\n\t\t* @param node - The call expression.\n\t\t* @returns The hook name, or `undefined` if the call is not a React hook.\n\t\t*/\n\t\tfunction getReactHook(node) {\n\t\t\tif (node.callee.type === \"Identifier\") {\n\t\t\t\tconst calleeName = node.callee.name;\n\t\t\t\tif (reactHookNames.includes(calleeName) || calleeName in hookAliasMap) return calleeName;\n\t\t\t} else if (node.callee.type === \"MemberExpression\" && node.callee.object.type === \"Identifier\" && node.callee.object.name === \"React\" && node.callee.property.type === \"Identifier\" && reactHookNames.includes(node.callee.property.name)) return node.callee.property.name;\n\t\t}\n\t\t/**\n\t\t* Tracks the variables bound to a query hook's result, so they can be reported when used as\n\t\t* dependencies.\n\t\t* @param pattern - The binding: an identifier, or an array pattern whose elements and rest\n\t\t* element are tracked.\n\t\t* @param queryHook - The name of the query hook the result comes from.\n\t\t*/\n\t\tfunction collectVariableNames(pattern, queryHook) {\n\t\t\tif (pattern.type === AST_NODE_TYPES.Identifier) trackedVariables[pattern.name] = queryHook;\n\t\t\telse if (pattern.type === AST_NODE_TYPES.ArrayPattern) for (const element of pattern.elements) {\n\t\t\t\tif (element === null) continue;\n\t\t\t\tif (element.type === AST_NODE_TYPES.Identifier) trackedVariables[element.name] = queryHook;\n\t\t\t\telse if (element.type === AST_NODE_TYPES.RestElement && element.argument.type === AST_NODE_TYPES.Identifier) trackedVariables[element.argument.name] = queryHook;\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Checks whether a name follows the custom hook naming convention.\n\t\t* @param hookName - The name to check.\n\t\t* @returns `true` if the name starts with `use` followed by an uppercase letter or a digit.\n\t\t*/\n\t\tfunction isCustomHookName(hookName) {\n\t\t\treturn /^use[A-Z0-9]/.test(hookName);\n\t\t}\n\t\t/**\n\t\t* Checks whether a call passes an object literal with a `combine` property as its first argument.\n\t\t* @param callExpression - The call expression to check.\n\t\t* @returns `true` if the first argument has a `combine` property.\n\t\t*/\n\t\tfunction hasCombineProperty(callExpression) {\n\t\t\tif (callExpression.arguments.length === 0) return false;\n\t\t\tconst firstArg = callExpression.arguments[0];\n\t\t\tif (!firstArg || firstArg.type !== AST_NODE_TYPES.ObjectExpression) return false;\n\t\t\treturn firstArg.properties.some((prop) => prop.type === AST_NODE_TYPES.Property && prop.key.type === AST_NODE_TYPES.Identifier && prop.key.name === \"combine\");\n\t\t}\n\t\t/**\n\t\t* Returns the name of the TanStack Query hook a call expression calls directly. `useQueries` and\n\t\t* `useSuspenseQueries` with `combine` are ignored, since their result can be stable.\n\t\t* @param callExpression - The call to check.\n\t\t* @returns The hook name, or `undefined` if the call is not a tracked query hook.\n\t\t*/\n\t\tfunction getDirectQueryHook(callExpression) {\n\t\t\tif (callExpression.callee.type !== AST_NODE_TYPES.Identifier || !allHookNames.includes(callExpression.callee.name) || !helpers.isTanstackQueryImport(callExpression.callee)) return;\n\t\t\tif ((callExpression.callee.name === \"useQueries\" || callExpression.callee.name === \"useSuspenseQueries\") && hasCombineProperty(callExpression)) return;\n\t\t\treturn callExpression.callee.name;\n\t\t}\n\t\t/**\n\t\t* Returns the query hook behind a call expression: a direct query hook call, or a custom hook that\n\t\t* returns one.\n\t\t* @param callExpression - The call to check.\n\t\t* @returns The query hook name, or `undefined` if there is none.\n\t\t*/\n\t\tfunction getTrackedQueryHook(callExpression) {\n\t\t\tconst directQueryHook = getDirectQueryHook(callExpression);\n\t\t\tif (directQueryHook !== void 0) return directQueryHook;\n\t\t\tif (callExpression.callee.type === AST_NODE_TYPES.Identifier) return trackedCustomHooks[callExpression.callee.name];\n\t\t}\n\t\t/**\n\t\t* Returns the query hook that a custom hook's body returns: either an expression body that calls\n\t\t* one, or a block with a single `return` of such a call.\n\t\t* @param body - The body of the custom hook.\n\t\t* @returns The query hook name, or `undefined` if the body doesn't return one.\n\t\t*/\n\t\tfunction getReturnedQueryHook(body) {\n\t\t\tif (body.type === AST_NODE_TYPES.CallExpression) return getDirectQueryHook(body);\n\t\t\tif (body.type !== AST_NODE_TYPES.BlockStatement) return;\n\t\t\tconst returnStatements = body.body.filter((statement) => statement.type === AST_NODE_TYPES.ReturnStatement);\n\t\t\tif (returnStatements.length !== 1) return;\n\t\t\tconst returnArgument = returnStatements[0]?.argument;\n\t\t\tif (returnArgument?.type === AST_NODE_TYPES.CallExpression) return getDirectQueryHook(returnArgument);\n\t\t}\n\t\t/**\n\t\t* Reports the tracked query results used in a React hook's dependency array.\n\t\t* @param reactHook - The name of the React hook.\n\t\t* @param depsArray - The dependency array to check.\n\t\t*/\n\t\tfunction checkDependencyArray(reactHook, depsArray) {\n\t\t\tdepsArray.elements.forEach((dep) => {\n\t\t\t\tif (dep !== null && dep.type === AST_NODE_TYPES.Identifier && trackedVariables[dep.name] !== void 0) {\n\t\t\t\t\tconst queryHook = trackedVariables[dep.name];\n\t\t\t\t\tcontext.report({\n\t\t\t\t\t\tnode: dep,\n\t\t\t\t\t\tmessageId: \"noUnstableDeps\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tqueryHook,\n\t\t\t\t\t\t\treactHook\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn {\n\t\t\tImportDeclaration(node) {\n\t\t\t\tif (node.specifiers.length > 0 && node.importKind === \"value\" && node.source.value === \"react\") node.specifiers.forEach((specifier) => {\n\t\t\t\t\tif (specifier.type === AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === AST_NODE_TYPES.Identifier && reactHookNames.includes(specifier.imported.name)) hookAliasMap[specifier.local.name] = specifier.imported.name;\n\t\t\t\t});\n\t\t\t},\n\t\t\tFunctionDeclaration(node) {\n\t\t\t\tif (node.id === null || !isCustomHookName(node.id.name)) return;\n\t\t\t\tconst queryHook = getReturnedQueryHook(node.body);\n\t\t\t\tif (queryHook !== void 0) trackedCustomHooks[node.id.name] = queryHook;\n\t\t\t},\n\t\t\tVariableDeclarator(node) {\n\t\t\t\tif (node.id.type === AST_NODE_TYPES.Identifier && isCustomHookName(node.id.name) && node.init !== null && (node.init.type === AST_NODE_TYPES.ArrowFunctionExpression || node.init.type === AST_NODE_TYPES.FunctionExpression)) {\n\t\t\t\t\tconst queryHook = getReturnedQueryHook(node.init.body);\n\t\t\t\t\tif (queryHook !== void 0) trackedCustomHooks[node.id.name] = queryHook;\n\t\t\t\t}\n\t\t\t\tif (node.init !== null && node.init.type === AST_NODE_TYPES.CallExpression) pendingVariableDeclarators.push(node);\n\t\t\t},\n\t\t\tCallExpression: (node) => {\n\t\t\t\tconst reactHook = getReactHook(node);\n\t\t\t\tif (reactHook !== void 0 && node.arguments.length > 1 && node.arguments[1]?.type === AST_NODE_TYPES.ArrayExpression) pendingDependencyChecks.push({\n\t\t\t\t\treactHook,\n\t\t\t\t\tdepsArray: node.arguments[1]\n\t\t\t\t});\n\t\t\t},\n\t\t\t\"Program:exit\"() {\n\t\t\t\tpendingVariableDeclarators.forEach((node) => {\n\t\t\t\t\tif (node.init?.type !== AST_NODE_TYPES.CallExpression) return;\n\t\t\t\t\tconst queryHook = getTrackedQueryHook(node.init);\n\t\t\t\t\tif (queryHook !== void 0) collectVariableNames(node.id, queryHook);\n\t\t\t\t});\n\t\t\t\tpendingDependencyChecks.forEach(({ reactHook, depsArray }) => {\n\t\t\t\t\tcheckDependencyArray(reactHook, depsArray);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t})\n});\n// src/utils/sort-data-by-order.ts\n/**\n* Sorts the items covered by the order rules into the required order, keeping the other items in\n* place.\n* @param data - The items to sort.\n* @param orderRules - Pairs of groups: items whose `key` is in the first group must come before\n* those in the second.\n* @param key - The property of each item to compare against the groups.\n* @returns The sorted items, or `null` if they were already in order.\n*/\nfunction sortDataByOrder(data, orderRules, key) {\n\tconst getSubsetIndex = (item, subsets) => {\n\t\tfor (let i = 0; i < subsets.length; i++) if (subsets[i]?.includes(item)) return i;\n\t\treturn null;\n\t};\n\tconst orderSets = orderRules.reduce((sets, [A, B]) => [\n\t\t...sets,\n\t\tA,\n\t\tB\n\t], []);\n\tconst inOrderArray = data.filter((item) => getSubsetIndex(item[key], orderSets) !== null);\n\tlet wasResorted = false;\n\tconst inOrderIterator = inOrderArray.sort((a, b) => {\n\t\tconst aKey = a[key], bKey = b[key];\n\t\tconst aSubsetIndex = getSubsetIndex(aKey, orderSets);\n\t\tconst bSubsetIndex = getSubsetIndex(bKey, orderSets);\n\t\tif (aSubsetIndex !== null && bSubsetIndex !== null && aSubsetIndex !== bSubsetIndex) return aSubsetIndex - bSubsetIndex;\n\t\treturn 0;\n\t}).values();\n\tconst result = data.map((item) => {\n\t\tif (getSubsetIndex(item[key], orderSets) !== null) {\n\t\t\tconst sortedItem = inOrderIterator.next().value;\n\t\t\tif (sortedItem[key] !== item[key]) wasResorted = true;\n\t\t\treturn sortedItem;\n\t\t}\n\t\treturn item;\n\t});\n\tif (!wasResorted) return null;\n\treturn result;\n}\n// src/utils/create-property-order-rule.ts\nconst createRule$2 = ESLintUtils.RuleCreator(getDocsUrl);\n/**\n* Creates a rule that reports when the properties of the options object passed to the target\n* functions are not in the required order.\n* @param options - The rule's metadata, such as `name`, `meta`, and `defaultOptions`.\n* @param targetFunctions - The names of the functions whose first argument is checked.\n* @param orderRules - Pairs of property groups: the properties of the first group must come before\n* those of the second.\n* @returns An ESLint rule that reports out-of-order properties and fixes them.\n*/\nfunction createPropertyOrderRule(options, targetFunctions, orderRules) {\n\tconst targetFunctionSet = new Set(targetFunctions);\n\t/**\n\t* Checks whether a function name is one of the target functions.\n\t* @param node - The function name.\n\t* @returns `true` if the name is a target function.\n\t*/\n\tfunction isTargetFunction(node) {\n\t\treturn targetFunctionSet.has(node);\n\t}\n\treturn createRule$2({\n\t\t...options,\n\t\tcreate: detectTanstackQueryImports((context) => {\n\t\t\treturn { CallExpression(node) {\n\t\t\t\tif (node.callee.type !== AST_NODE_TYPES.Identifier) return;\n\t\t\t\tconst functions = node.callee.name;\n\t\t\t\tif (!isTargetFunction(functions)) return;\n\t\t\t\tconst argument = node.arguments[0];\n\t\t\t\tif (argument === void 0 || argument.type !== \"ObjectExpression\") return;\n\t\t\t\tconst allProperties = argument.properties;\n\t\t\t\tif (allProperties.length < 2) return;\n\t\t\t\tconst sortedProperties = sortDataByOrder(allProperties.flatMap((p, index) => {\n\t\t\t\t\tif (p.type === AST_NODE_TYPES.Property && p.key.type === AST_NODE_TYPES.Identifier) return {\n\t\t\t\t\t\tname: p.key.name,\n\t\t\t\t\t\tproperty: p\n\t\t\t\t\t};\n\t\t\t\t\telse return {\n\t\t\t\t\t\tname: `_property_${index}`,\n\t\t\t\t\t\tproperty: p\n\t\t\t\t\t};\n\t\t\t\t}), orderRules, \"name\");\n\t\t\t\tif (sortedProperties === null) return;\n\t\t\t\tcontext.report({\n\t\t\t\t\tnode: argument,\n\t\t\t\t\tdata: { function: node.callee.name },\n\t\t\t\t\tmessageId: \"invalidOrder\",\n\t\t\t\t\tfix(fixer) {\n\t\t\t\t\t\tconst sourceCode = context.sourceCode;\n\t\t\t\t\t\tconst reorderedText = sortedProperties.reduce((sourceText, specifier, index) => {\n\t\t\t\t\t\t\tlet textBetweenProperties = \"\";\n\t\t\t\t\t\t\tif (index < allProperties.length - 1) textBetweenProperties = sourceCode.getText().slice(allProperties[index].range[1], allProperties[index + 1].range[0]);\n\t\t\t\t\t\t\treturn sourceText + sourceCode.getText(specifier.property) + textBetweenProperties;\n\t\t\t\t\t\t}, \"\");\n\t\t\t\t\t\treturn fixer.replaceTextRange([allProperties[0].range[0], allProperties.at(-1).range[1]], reorderedText);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} };\n\t\t})\n\t});\n}\n// src/rules/infinite-query-property-order/constants.ts\nconst infiniteQueryFunctions = [\n\t\"infiniteQueryOptions\",\n\t\"useInfiniteQuery\",\n\t\"useSuspenseInfiniteQuery\"\n];\nconst sortRules$1 = [[[\"queryFn\"], [\"getPreviousPageParam\", \"getNextPageParam\"]]];\n// src/rules/infinite-query-property-order/infinite-query-property-order.rule.ts\nconst name$3 = \"infinite-query-property-order\";\nconst rule$3 = createPropertyOrderRule({\n\tname: name$3,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Ensure correct order of inference sensitive properties for infinite queries\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tmessages: { invalidOrder: \"Invalid order of properties for `{{function}}`.\" },\n\t\tschema: [],\n\t\thasSuggestions: true,\n\t\tfixable: \"code\"\n\t},\n\tdefaultOptions: []\n}, infiniteQueryFunctions, sortRules$1);\n// src/rules/no-void-query-fn/no-void-query-fn.rule.ts\nconst name$2 = \"no-void-query-fn\";\nconst rule$2 = ESLintUtils.RuleCreator(getDocsUrl)({\n\tname: name$2,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Ensures queryFn returns a non-undefined value\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tmessages: { noVoidReturn: \"queryFn must return a non-undefined value\" },\n\t\tschema: []\n\t},\n\tdefaultOptions: [],\n\tcreate: detectTanstackQueryImports((context) => {\n\t\treturn { Property(node) {\n\t\t\tif (!ASTUtils.isObjectExpression(node.parent) || !ASTUtils.isIdentifierWithName(node.key, \"queryFn\")) return;\n\t\t\tconst parserServices = context.sourceCode.parserServices;\n\t\t\tif (!parserServices || !parserServices.esTreeNodeToTSNodeMap || !parserServices.program) return;\n\t\t\tconst checker = parserServices.program.getTypeChecker();\n\t\t\tconst tsNode = parserServices.esTreeNodeToTSNodeMap.get(node.value);\n\t\t\tconst type = checker.getTypeAtLocation(tsNode);\n\t\t\tif (type.getCallSignatures().length > 0) {\n\t\t\t\tconst returnType = type.getCallSignatures()[0]?.getReturnType();\n\t\t\t\tif (!returnType) return;\n\t\t\t\tif (isIllegalReturn(checker, returnType)) context.report({\n\t\t\t\t\tnode: node.value,\n\t\t\t\t\tmessageId: \"noVoidReturn\"\n\t\t\t\t});\n\t\t\t}\n\t\t} };\n\t})\n});\n/**\n* Checks whether a query function's return type resolves to `void` or `undefined`, including in any\n* member of a union.\n* @param checker - The TypeScript type checker.\n* @param type - The return type of the query function.\n* @returns `true` if the awaited type, or a member of it, is `void` or `undefined`.\n*/\nfunction isIllegalReturn(checker, type) {\n\tconst awaited = checker.getAwaitedType(type);\n\tif (!awaited) return false;\n\tif (awaited.isUnion()) return awaited.types.some((t) => isIllegalReturn(checker, t));\n\tconst typeString = checker.typeToString(awaited);\n\treturn typeString === \"void\" || typeString === \"undefined\";\n}\n// src/rules/mutation-property-order/constants.ts\nconst mutationFunctions = [\"useMutation\"];\nconst sortRules = [[[\"onMutate\"], [\"onError\", \"onSettled\"]]];\n// src/rules/mutation-property-order/mutation-property-order.rule.ts\nconst name$1 = \"mutation-property-order\";\nconst rule$1 = createPropertyOrderRule({\n\tname: name$1,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Ensure correct order of inference-sensitive properties in useMutation()\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tmessages: { invalidOrder: \"Invalid order of properties for `{{function}}`.\" },\n\t\tschema: [],\n\t\thasSuggestions: true,\n\t\tfixable: \"code\"\n\t},\n\tdefaultOptions: []\n}, mutationFunctions, sortRules);\n// src/rules/prefer-query-options/prefer-query-options.rule.ts\nconst name = \"prefer-query-options\";\nconst queryHooks = [\n\t\"useQuery\",\n\t\"useInfiniteQuery\",\n\t\"useSuspenseQuery\",\n\t\"useSuspenseInfiniteQuery\",\n\t\"usePrefetchQuery\",\n\t\"usePrefetchInfiniteQuery\"\n];\nconst queriesHooks = [\"useQueries\", \"useSuspenseQueries\"];\nconst filterHooks = [\"useIsFetching\"];\nconst queryClientOptionMethods = [\n\t\"fetchQuery\",\n\t\"prefetchQuery\",\n\t\"fetchInfiniteQuery\",\n\t\"prefetchInfiniteQuery\",\n\t\"ensureQueryData\",\n\t\"ensureInfiniteQueryData\"\n];\nconst queryClientQueryKeyMethods = [\n\t\"getQueryData\",\n\t\"setQueryData\",\n\t\"getQueryState\",\n\t\"setQueryDefaults\",\n\t\"getQueryDefaults\"\n];\nconst queryClientFilterMethods = [\n\t\"invalidateQueries\",\n\t\"cancelQueries\",\n\t\"refetchQueries\",\n\t\"removeQueries\",\n\t\"resetQueries\",\n\t\"isFetching\",\n\t\"getQueriesData\",\n\t\"setQueriesData\"\n];\nconst queryOptionsBuilders = [\"queryOptions\", \"infiniteQueryOptions\"];\nconst rule = ESLintUtils.RuleCreator(getDocsUrl)({\n\tname,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Prefer using queryOptions() to co-locate queryKey and queryFn\",\n\t\t\trecommended: \"strict\"\n\t\t},\n\t\tmessages: {\n\t\t\tpreferQueryOptions: \"Prefer using queryOptions() or infiniteQueryOptions() to co-locate queryKey and queryFn.\",\n\t\t\tpreferQueryOptionsQueryKey: \"Prefer referencing a queryKey from a queryOptions() result instead of typing it manually.\"\n\t\t},\n\t\tschema: []\n\t},\n\tdefaultOptions: [],\n\tcreate: detectTanstackQueryImports((context, _, helpers) => {\n\t\t/**\n\t\t* Reports an object literal passed as query options that defines `queryKey` or `queryFn` inline.\n\t\t* @param node - The argument passed as query options.\n\t\t*/\n\t\tfunction reportInlineQueryOptions(node) {\n\t\t\tif (ASTUtils.isObjectExpression(node) && hasInlineQueryOptions(node)) context.report({\n\t\t\t\tnode,\n\t\t\t\tmessageId: \"preferQueryOptions\"\n\t\t\t});\n\t\t}\n\t\t/**\n\t\t* Reports an object literal passed as query filters whose `queryKey` is an inline array.\n\t\t* @param node - The filters node.\n\t\t*/\n\t\tfunction reportInlineFilterQueryKey(node) {\n\t\t\tif (ASTUtils.isObjectExpression(node) && hasInlineFilterQueryKey(node)) context.report({\n\t\t\t\tnode,\n\t\t\t\tmessageId: \"preferQueryOptionsQueryKey\"\n\t\t\t});\n\t\t}\n\t\treturn { CallExpression: (node) => {\n\t\t\tif (ASTUtils.isIdentifier(node.callee)) {\n\t\t\t\tconst importedName = getTanstackImportName(context, helpers, node.callee);\n\t\t\t\tif (importedName === null) return;\n\t\t\t\tif (queryOptionsBuilders.includes(importedName)) return;\n\t\t\t\tconst options = node.arguments[0];\n\t\t\t\tif (options === void 0) return;\n\t\t\t\tif (queryHooks.includes(importedName)) {\n\t\t\t\t\treportInlineQueryOptions(options);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (queriesHooks.includes(importedName) && ASTUtils.isObjectExpression(options)) {\n\t\t\t\t\tconst queries = ASTUtils.findPropertyWithIdentifierKey(options.properties, \"queries\")?.value;\n\t\t\t\t\tif (queries !== void 0) getQueryObjects(queries).forEach((query) => {\n\t\t\t\t\t\treportInlineQueryOptions(query);\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (filterHooks.includes(importedName)) reportInlineFilterQueryKey(options);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (node.callee.type !== AST_NODE_TYPES.MemberExpression || !ASTUtils.isIdentifier(node.callee.property) || !isTanstackQueryClient(node.callee.object, context, helpers)) return;\n\t\t\tconst method = node.callee.property.name;\n\t\t\tconst options = node.arguments[0];\n\t\t\tif (options === void 0) return;\n\t\t\tif (queryClientOptionMethods.includes(method)) {\n\t\t\t\treportInlineQueryOptions(options);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (queryClientQueryKeyMethods.includes(method) && isInlineArrayExpression(options)) {\n\t\t\t\tcontext.report({\n\t\t\t\t\tnode: options,\n\t\t\t\t\tmessageId: \"preferQueryOptionsQueryKey\"\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (queryClientFilterMethods.includes(method)) reportInlineFilterQueryKey(options);\n\t\t} };\n\t})\n});\n/**\n* Checks whether an object literal defines `queryKey` or `queryFn` inline.\n* @param node - The object literal.\n* @returns `true` if it has a `queryKey` or `queryFn` property.\n*/\nfunction hasInlineQueryOptions(node) {\n\treturn ASTUtils.findPropertyWithIdentifierKey(node.properties, \"queryKey\") !== void 0 || ASTUtils.findPropertyWithIdentifierKey(node.properties, \"queryFn\") !== void 0;\n}\n/**\n* Checks whether an object literal has a `queryKey` written as an inline array.\n* @param node - The object literal.\n* @returns `true` if its `queryKey` is an array literal, ignoring type assertions.\n*/\nfunction hasInlineFilterQueryKey(node) {\n\tconst queryKey = ASTUtils.findPropertyWithIdentifierKey(node.properties, \"queryKey\")?.value;\n\treturn queryKey !== void 0 && isInlineArrayExpression(queryKey);\n}\n/**\n* Checks whether a node is an array literal, ignoring type assertions.\n* @param node - The node to check.\n* @returns `true` if the node is an array literal.\n*/\nfunction isInlineArrayExpression(node) {\n\treturn unwrapTypeAssertions(node).type === AST_NODE_TYPES.ArrayExpression;\n}\n/**\n* Collects the object literals a node can evaluate to, following function bodies, `return`\n* statements, and conditional, logical, and sequence expressions.\n* @param node - The node to collect from.\n* @returns The object literals the node can evaluate to.\n*/\nfunction getReturnedObjectExpressions(node) {\n\tif (ASTUtils.isObjectExpression(node)) return [node];\n\tif (node.type === AST_NODE_TYPES.ArrowFunctionExpression || node.type === AST_NODE_TYPES.FunctionExpression) return getReturnedObjectExpressions(node.body);\n\tif (node.type === AST_NODE_TYPES.BlockStatement) return node.body.flatMap((statement) => {\n\t\tif (statement.type === AST_NODE_TYPES.ReturnStatement && statement.argument !== null) return getReturnedObjectExpressions(statement.argument);\n\t\treturn [];\n\t});\n\tif (node.type === AST_NODE_TYPES.ConditionalExpression) return [...getReturnedObjectExpressions(node.consequent), ...getReturnedObjectExpressions(node.alternate)];\n\tif (node.type === AST_NODE_TYPES.LogicalExpression) return [...getReturnedObjectExpressions(node.left), ...getReturnedObjectExpressions(node.right)];\n\tif (node.type === AST_NODE_TYPES.SequenceExpression) return node.expressions.flatMap((expression) => getReturnedObjectExpressions(expression));\n\treturn [];\n}\n/**\n* Collects the query option objects of a `queries` array: the object literals in an array literal,\n* or those returned by the callback of a `.map()` call.\n* @param node - The `queries` value.\n* @returns The query option object literals.\n*/\nfunction getQueryObjects(node) {\n\tif (node.type === AST_NODE_TYPES.ArrayExpression) return node.elements.flatMap((element) => {\n\t\tif (element !== null && ASTUtils.isObjectExpression(element)) return [element];\n\t\treturn [];\n\t});\n\tif (node.type === AST_NODE_TYPES.CallExpression && node.callee.type === AST_NODE_TYPES.MemberExpression && ASTUtils.isIdentifierWithName(node.callee.property, \"map\")) {\n\t\tconst mapper = node.arguments[0];\n\t\tif (mapper?.type === AST_NODE_TYPES.ArrowFunctionExpression || mapper?.type === AST_NODE_TYPES.FunctionExpression) return getReturnedObjectExpressions(mapper);\n\t}\n\treturn [];\n}\n/**\n* Checks whether a node refers to a TanStack Query client, created with `useQueryClient()` or\n* `new QueryClient()`.\n* @param node - The node to check.\n* @param context - The rule context, used to resolve variables.\n* @param helpers - The helpers that check TanStack Query imports.\n* @returns `true` if the node comes from `useQueryClient()` or `new QueryClient()`.\n*/\nfunction isTanstackQueryClient(node, context, helpers) {\n\tconst source = resolveQueryClientSource(node, context);\n\tif (source.type === AST_NODE_TYPES.CallExpression && ASTUtils.isIdentifier(source.callee)) return getTanstackImportName(context, helpers, source.callee) === \"useQueryClient\";\n\tif (source.type === AST_NODE_TYPES.NewExpression && ASTUtils.isIdentifier(source.callee)) return getTanstackImportName(context, helpers, source.callee) === \"QueryClient\";\n\treturn false;\n}\n/**\n* Returns the name an identifier was imported under from TanStack Query.\n* @param context - The rule context.\n* @param helpers - The helpers that check TanStack Query imports.\n* @param node - The identifier.\n* @returns The imported name, or `null` if the identifier isn't a named TanStack Query import.\n*/\nfunction getTanstackImportName(context, helpers, node) {\n\tif (!helpers.isTanstackQueryImport(node)) return null;\n\tconst definition = context.sourceCode.getScope(node).references.find((reference) => reference.identifier === node)?.resolved?.defs[0]?.node;\n\tif (definition?.type !== AST_NODE_TYPES.ImportSpecifier || definition.imported.type !== AST_NODE_TYPES.Identifier) return null;\n\treturn definition.imported.name;\n}\n/**\n* Follows variable references, optional chains, and type assertions from a node to the expression it\n* comes from.\n* @param node - The node to start from.\n* @param context - The rule context, used to resolve variables.\n* @returns The innermost node that can't be resolved further.\n*/\nfunction resolveQueryClientSource(node, context) {\n\tconst visitedNodes = /* @__PURE__ */ new Set();\n\twhile (!visitedNodes.has(node)) {\n\t\tvisitedNodes.add(node);\n\t\tif (node.type === AST_NODE_TYPES.ChainExpression) {\n\t\t\tnode = node.expression;\n\t\t\tcontinue;\n\t\t}\n\t\tnode = unwrapTypeAssertions(node);\n\t\tif (node.type !== AST_NODE_TYPES.Identifier) return node;\n\t\tconst expression = ASTUtils.getReferencedExpressionByIdentifier({\n\t\t\tcontext,\n\t\t\tnode\n\t\t});\n\t\tif (expression === null) return node;\n\t\tnode = expression;\n\t}\n\treturn node;\n}\n/**\n* Removes `as`, `satisfies`, and angle-bracket type assertions around a node.\n* @param node - The node to unwrap.\n* @returns The node inside the type assertions.\n*/\nfunction unwrapTypeAssertions(node) {\n\twhile (node.type === AST_NODE_TYPES.TSAsExpression || node.type === AST_NODE_TYPES.TSSatisfiesExpression || node.type === AST_NODE_TYPES.TSTypeAssertion) node = node.expression;\n\treturn node;\n}\n// src/rules.ts\nconst rules = {\n\t[name$7]: rule$7,\n\t[name$6]: rule$6,\n\t[name$5]: rule$5,\n\t[name$4]: rule$4,\n\t[name$3]: rule$3,\n\t[name$2]: rule$2,\n\t[name$1]: rule$1,\n\t[name]: rule\n};\nexport { rules as t };\n\n\n//# sourceMappingURL=rules-D9GziSYo.js.map","import { t as rules } from \"./rules-D9GziSYo.js\";\n// src/index.ts\nconst recommendedRules = {\n\t\"@tanstack/query/exhaustive-deps\": \"error\",\n\t\"@tanstack/query/no-rest-destructuring\": \"warn\",\n\t\"@tanstack/query/stable-query-client\": \"error\",\n\t\"@tanstack/query/no-unstable-deps\": \"error\",\n\t\"@tanstack/query/infinite-query-property-order\": \"error\",\n\t\"@tanstack/query/no-void-query-fn\": \"error\",\n\t\"@tanstack/query/mutation-property-order\": \"error\"\n};\nconst recommendedStrictRules = {\n\t...recommendedRules,\n\t\"@tanstack/query/prefer-query-options\": \"error\"\n};\nconst plugin = {\n\tmeta: { name: \"@tanstack/eslint-plugin-query\" },\n\tconfigs: {\n\t\trecommended: {\n\t\t\tplugins: [\"@tanstack/query\"],\n\t\t\trules: recommendedRules\n\t\t},\n\t\trecommendedStrict: {\n\t\t\tplugins: [\"@tanstack/query\"],\n\t\t\trules: recommendedStrictRules\n\t\t},\n\t\t\"flat/recommended\": [{\n\t\t\tname: \"tanstack/query/flat/recommended\",\n\t\t\tplugins: { \"@tanstack/query\": {} },\n\t\t\trules: recommendedRules\n\t\t}],\n\t\t\"flat/recommended-strict\": [{\n\t\t\tname: \"tanstack/query/flat/recommended-strict\",\n\t\t\tplugins: { \"@tanstack/query\": {} },\n\t\t\trules: recommendedStrictRules\n\t\t}]\n\t},\n\trules\n};\nplugin.configs[\"flat/recommended\"][0].plugins[\"@tanstack/query\"] = plugin;\nplugin.configs[\"flat/recommended-strict\"][0].plugins[\"@tanstack/query\"] = plugin;\nexport { plugin as default, plugin };\n\n\n//# sourceMappingURL=index.js.map","import tanstackQuery from \"@tanstack/eslint-plugin-query\";\n\nimport { optionallyTypedRules } from \"./typed-rule.ts\";\nimport { upstreamPlugin } from \"./upstream-plugin.ts\";\nimport type { UpstreamPlugin } from \"./upstream-plugin.ts\";\n\ntype ConfigName =\n | \"recommended\"\n | \"recommendedStrict\"\n | \"flat/recommended\"\n | \"flat/recommended-strict\";\n\nconst plugin: UpstreamPlugin<ConfigName> = upstreamPlugin(\n \"tanstack-query\",\n tanstackQuery,\n optionallyTypedRules,\n);\n\nexport type { ConfigName };\nexport default plugin;\n"],"ignoreList":[0,1],"mappings":";;;;AAAgF,6BAAA;;;;;;;AAQhF,SAAS,SAAS,KAAK,IAAI;CAC1B,OAAO,IAAI,QAAQ,GAAG,GAAG,MAAM,EAAE,WAAW,MAAM,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;AACzE;AAEA,MAAM,WAAW;CAChB,cAAc,MAAM,OAAO;EAC1B,OAAO,MAAM,SAAS,KAAK,IAAI;CAChC;CACA,aAAa,MAAM;EAClB,OAAO,KAAK,SAASA,YAAAA,eAAe;CACrC;CACA,qBAAqB,MAAM,MAAM;EAChC,OAAO,SAAS,a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AAMA,SAAS,qBAAqB,MAAM;CACnC,OAAO,KAAK,SAASA,YAAAA,eAAe,kBAAkB,KAAK,SAASA,YAAAA,eAAe,yBAAyB,KAAK,SAASA,YAAAA,eAAe,iBAAiB,OAAO,KAAK;CACtK,OAAO;AACR;AAEA,MAAM,QAAQ;EACZ,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,OAAO;AACT;;ACl0CA,MAAM,mBAAmB;CACxB,mCAAmC;CACnC,yCAAyC;CACzC,uCAAuC;CACvC,oCAAoC;CACpC,iDAAiD;CACjD,oCAAoC;CACpC,2CAA2C;AAC5C;AACA,MAAM,yBAAyB;CAC9B,GAAG;CACH,wCAAwC;AACzC;AACA,MAAMG,WAAS;CACd,MAAM,EAAE,MAAM,gCAAgC;CAC9C,SAAS;EACR,aAAa;GACZ,SAAS,CAAC,iBAAiB;GAC3B,OAAO;EACR;EACA,mBAAmB;GAClB,SAAS,CAAC,iBAAiB;GAC3B,OAAO;EACR;EACA,oBAAoB,CAAC;GACpB,MAAM;GACN,SAAS,EAAE,mBAAmB,CAAC,EAAE;GACjC,OAAO;EACR,CAAC;EACD,2BAA2B,CAAC;GAC3B,MAAM;GACN,SAAS,EAAE,mBAAmB,CAAC,EAAE;GACjC,OAAO;EACR,CAAC;CACF;CACA;AACD;AACA,SAAO,QAAQ,mBAAmB,CAAC,EAAE,CAAC,QAAQ,qBAAqBA;AACnE,SAAO,QAAQ,0BAA0B,CAAC,EAAE,CAAC,QAAQ,qBAAqBA;;AC5B1E,MAAM,SAAqC,eACzC,kBACAC,UACA,oBACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { t as UpstreamPlugin } from "./upstream-plugin-xn91RvOJ.mjs";
|
|
2
|
+
type ConfigName = "recommended" | "flat/recommended";
|
|
3
|
+
declare const plugin: UpstreamPlugin<ConfigName>;
|
|
4
|
+
export { type ConfigName, plugin as default };
|
|
5
|
+
//# sourceMappingURL=tanstack-router.d.mts.map
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { n as import_eslint_utils, r as init_typescript_eslint_utils, t as import_dist } from "./typescript-eslint-utils-QnYasB-9.mjs";
|
|
2
|
+
import { n as upstreamPlugin, t as plainRules } from "./upstream-plugin-DqJEA6iy.mjs";
|
|
3
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/utils/get-docs-url.js
|
|
4
|
+
var getDocsUrl = (ruleName) => `https://tanstack.com/router/latest/docs/eslint/${ruleName}`;
|
|
5
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/utils/detect-router-imports.js
|
|
6
|
+
init_typescript_eslint_utils();
|
|
7
|
+
function detectTanstackRouterImports(create) {
|
|
8
|
+
return (context, optionsWithDefault) => {
|
|
9
|
+
const tanstackRouterImportSpecifiers = [];
|
|
10
|
+
const helpers = {
|
|
11
|
+
isSpecificTanstackRouterImport(node, source) {
|
|
12
|
+
return !!tanstackRouterImportSpecifiers.find((specifier) => {
|
|
13
|
+
if (specifier.type === import_dist.TSESTree.AST_NODE_TYPES.ImportSpecifier && specifier.parent.type === import_dist.TSESTree.AST_NODE_TYPES.ImportDeclaration && specifier.parent.source.value === source) return node.name === specifier.local.name;
|
|
14
|
+
return false;
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
isTanstackRouterImport(node) {
|
|
18
|
+
return !!tanstackRouterImportSpecifiers.find((specifier) => {
|
|
19
|
+
if (specifier.type === import_dist.TSESTree.AST_NODE_TYPES.ImportSpecifier) return node.name === specifier.local.name;
|
|
20
|
+
return false;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const detectionInstructions = { ImportDeclaration(node) {
|
|
25
|
+
if (node.specifiers.length > 0 && node.importKind !== "type" && node.source.value.startsWith("@tanstack/") && node.source.value.endsWith("-router")) tanstackRouterImportSpecifiers.push(...node.specifiers);
|
|
26
|
+
} };
|
|
27
|
+
const ruleInstructions = create(context, optionsWithDefault, helpers);
|
|
28
|
+
const enhancedRuleInstructions = {};
|
|
29
|
+
new Set(Object.keys(detectionInstructions).concat(Object.keys(ruleInstructions))).forEach((instruction) => {
|
|
30
|
+
enhancedRuleInstructions[instruction] = (node) => {
|
|
31
|
+
if (instruction in detectionInstructions) detectionInstructions[instruction]?.(node);
|
|
32
|
+
const ruleFunction = ruleInstructions[instruction];
|
|
33
|
+
if (ruleFunction !== void 0) return ruleFunction(node);
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
return enhancedRuleInstructions;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/create-route-property-order/create-route-property-order.utils.js
|
|
40
|
+
function sortDataByOrder(data, orderRules, key) {
|
|
41
|
+
const getSubsetIndex = (item, subsets) => {
|
|
42
|
+
for (let i = 0; i < subsets.length; i++) if (subsets[i]?.includes(item)) return i;
|
|
43
|
+
return null;
|
|
44
|
+
};
|
|
45
|
+
const orderSets = orderRules.reduce((sets, [A, B]) => [
|
|
46
|
+
...sets,
|
|
47
|
+
A,
|
|
48
|
+
B
|
|
49
|
+
], []);
|
|
50
|
+
const inOrderArray = data.filter((item) => getSubsetIndex(item[key], orderSets) !== null);
|
|
51
|
+
let wasResorted = false;
|
|
52
|
+
const inOrderIterator = inOrderArray.sort((a, b) => {
|
|
53
|
+
const aKey = a[key], bKey = b[key];
|
|
54
|
+
const aSubsetIndex = getSubsetIndex(aKey, orderSets);
|
|
55
|
+
const bSubsetIndex = getSubsetIndex(bKey, orderSets);
|
|
56
|
+
if (aSubsetIndex !== null && bSubsetIndex !== null && aSubsetIndex !== bSubsetIndex) return aSubsetIndex - bSubsetIndex;
|
|
57
|
+
return 0;
|
|
58
|
+
}).values();
|
|
59
|
+
const result = data.map((item) => {
|
|
60
|
+
if (getSubsetIndex(item[key], orderSets) !== null) {
|
|
61
|
+
const sortedItem = inOrderIterator.next().value;
|
|
62
|
+
if (sortedItem[key] !== item[key]) wasResorted = true;
|
|
63
|
+
return sortedItem;
|
|
64
|
+
}
|
|
65
|
+
return item;
|
|
66
|
+
});
|
|
67
|
+
if (!wasResorted) return null;
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
function getCheckedProperties(orderRules) {
|
|
71
|
+
return [...new Set(orderRules.flat(2))];
|
|
72
|
+
}
|
|
73
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/create-route-property-order/constants.js
|
|
74
|
+
var createRouteFunctionsIndirect = ["createFileRoute", "createRootRouteWithContext"];
|
|
75
|
+
var createRouteFunctions = [...["createRootRoute", "createRoute"], ...createRouteFunctionsIndirect];
|
|
76
|
+
var sortRules = [
|
|
77
|
+
[["params", "validateSearch"], ["search"]],
|
|
78
|
+
[["search"], ["loaderDeps", "ssr"]],
|
|
79
|
+
[["loaderDeps"], ["context"]],
|
|
80
|
+
[["context"], ["beforeLoad"]],
|
|
81
|
+
[["beforeLoad"], ["loader"]],
|
|
82
|
+
[["loader"], [
|
|
83
|
+
"onEnter",
|
|
84
|
+
"onStay",
|
|
85
|
+
"onLeave",
|
|
86
|
+
"head",
|
|
87
|
+
"scripts",
|
|
88
|
+
"headers",
|
|
89
|
+
"remountDeps"
|
|
90
|
+
]]
|
|
91
|
+
];
|
|
92
|
+
getCheckedProperties(sortRules);
|
|
93
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/create-route-property-order/create-route-property-order.rule.js
|
|
94
|
+
init_typescript_eslint_utils();
|
|
95
|
+
var createRule$1 = import_eslint_utils.RuleCreator(getDocsUrl);
|
|
96
|
+
var createRouteFunctionSet = new Set(createRouteFunctions);
|
|
97
|
+
function isCreateRouteFunction(node) {
|
|
98
|
+
return createRouteFunctionSet.has(node);
|
|
99
|
+
}
|
|
100
|
+
var name$1 = "create-route-property-order";
|
|
101
|
+
var rule$1 = createRule$1({
|
|
102
|
+
name: name$1,
|
|
103
|
+
meta: {
|
|
104
|
+
type: "problem",
|
|
105
|
+
docs: {
|
|
106
|
+
description: "Ensure correct order of inference sensitive properties for createRoute functions",
|
|
107
|
+
recommended: "error"
|
|
108
|
+
},
|
|
109
|
+
messages: { invalidOrder: "Invalid order of properties for `{{function}}`." },
|
|
110
|
+
schema: [],
|
|
111
|
+
hasSuggestions: true,
|
|
112
|
+
fixable: "code"
|
|
113
|
+
},
|
|
114
|
+
defaultOptions: [],
|
|
115
|
+
create: detectTanstackRouterImports((context) => {
|
|
116
|
+
return { CallExpression(node) {
|
|
117
|
+
if (node.callee.type !== import_dist.AST_NODE_TYPES.Identifier) return;
|
|
118
|
+
const createRouteFunction = node.callee.name;
|
|
119
|
+
if (!isCreateRouteFunction(createRouteFunction)) return;
|
|
120
|
+
let args = node.arguments;
|
|
121
|
+
if (createRouteFunctionsIndirect.includes(createRouteFunction)) if (node.parent.type === import_dist.AST_NODE_TYPES.CallExpression) args = node.parent.arguments;
|
|
122
|
+
else return;
|
|
123
|
+
const argument = args[0];
|
|
124
|
+
if (argument === void 0 || argument.type !== "ObjectExpression") return;
|
|
125
|
+
const allProperties = argument.properties;
|
|
126
|
+
if (allProperties.length < 2) return;
|
|
127
|
+
const sortedProperties = sortDataByOrder(allProperties.flatMap((p) => {
|
|
128
|
+
if (p.type === import_dist.AST_NODE_TYPES.Property && p.key.type === import_dist.AST_NODE_TYPES.Identifier) return {
|
|
129
|
+
name: p.key.name,
|
|
130
|
+
property: p
|
|
131
|
+
};
|
|
132
|
+
else if (p.type === import_dist.AST_NODE_TYPES.SpreadElement) if (p.argument.type === import_dist.AST_NODE_TYPES.Identifier) return {
|
|
133
|
+
name: p.argument.name,
|
|
134
|
+
property: p
|
|
135
|
+
};
|
|
136
|
+
else throw new Error("Unsupported spread element");
|
|
137
|
+
return [];
|
|
138
|
+
}), sortRules, "name");
|
|
139
|
+
if (sortedProperties === null) return;
|
|
140
|
+
context.report({
|
|
141
|
+
node: argument,
|
|
142
|
+
data: { function: node.callee.name },
|
|
143
|
+
messageId: "invalidOrder",
|
|
144
|
+
fix(fixer) {
|
|
145
|
+
const sourceCode = context.sourceCode;
|
|
146
|
+
const text = sortedProperties.reduce((sourceText, specifier, index) => {
|
|
147
|
+
let text = "";
|
|
148
|
+
if (index < allProperties.length - 1) text = sourceCode.getText().slice(allProperties[index].range[1], allProperties[index + 1].range[0]);
|
|
149
|
+
return sourceText + sourceCode.getText(specifier.property) + text;
|
|
150
|
+
}, "");
|
|
151
|
+
return fixer.replaceTextRange([allProperties[0].range[0], allProperties.at(-1).range[1]], text);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
} };
|
|
155
|
+
})
|
|
156
|
+
});
|
|
157
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/route-param-names/constants.js
|
|
158
|
+
/**
|
|
159
|
+
* Functions where the path is passed as the first argument (string literal)
|
|
160
|
+
* e.g., createFileRoute('/path/$param')(...)
|
|
161
|
+
*/
|
|
162
|
+
var pathAsFirstArgFunctions = [
|
|
163
|
+
"createFileRoute",
|
|
164
|
+
"createLazyFileRoute",
|
|
165
|
+
"createLazyRoute"
|
|
166
|
+
];
|
|
167
|
+
/**
|
|
168
|
+
* Functions where the path is a property in the options object
|
|
169
|
+
* e.g., createRoute({ path: '/path/$param' })
|
|
170
|
+
*/
|
|
171
|
+
var pathAsPropertyFunctions = ["createRoute"];
|
|
172
|
+
[...pathAsFirstArgFunctions, ...pathAsPropertyFunctions];
|
|
173
|
+
/**
|
|
174
|
+
* Regex for valid JavaScript identifier (param name)
|
|
175
|
+
* Must start with letter, underscore, or dollar sign
|
|
176
|
+
* Can contain letters, numbers, underscores, or dollar signs
|
|
177
|
+
*/
|
|
178
|
+
var VALID_PARAM_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
|
|
179
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/route-param-names/route-param-names.utils.js
|
|
180
|
+
/**
|
|
181
|
+
* Extracts param names from a route path segment.
|
|
182
|
+
*
|
|
183
|
+
* Handles these patterns:
|
|
184
|
+
* - $paramName -> extract "paramName"
|
|
185
|
+
* - {$paramName} -> extract "paramName"
|
|
186
|
+
* - prefix{$paramName}suffix -> extract "paramName"
|
|
187
|
+
* - {-$paramName} -> extract "paramName" (optional)
|
|
188
|
+
* - prefix{-$paramName}suffix -> extract "paramName" (optional)
|
|
189
|
+
* - $ or {$} -> wildcard, skip validation
|
|
190
|
+
*/
|
|
191
|
+
function extractParamsFromSegment(segment) {
|
|
192
|
+
const params = [];
|
|
193
|
+
if (!segment || !segment.includes("$")) return params;
|
|
194
|
+
if (segment === "$" || segment === "{$}") return params;
|
|
195
|
+
if (segment.startsWith("$") && !segment.includes("{")) {
|
|
196
|
+
const paramName = segment.slice(1);
|
|
197
|
+
if (paramName) params.push({
|
|
198
|
+
fullParam: segment,
|
|
199
|
+
paramName,
|
|
200
|
+
isOptional: false,
|
|
201
|
+
isValid: VALID_PARAM_NAME_REGEX.test(paramName)
|
|
202
|
+
});
|
|
203
|
+
return params;
|
|
204
|
+
}
|
|
205
|
+
const bracePattern = /\{(-?\$)([^}]*)\}/g;
|
|
206
|
+
let match;
|
|
207
|
+
while ((match = bracePattern.exec(segment)) !== null) {
|
|
208
|
+
const prefix = match[1];
|
|
209
|
+
const paramName = match[2];
|
|
210
|
+
if (!paramName) continue;
|
|
211
|
+
const isOptional = prefix === "-$";
|
|
212
|
+
params.push({
|
|
213
|
+
fullParam: `${prefix}${paramName}`,
|
|
214
|
+
paramName,
|
|
215
|
+
isOptional,
|
|
216
|
+
isValid: VALID_PARAM_NAME_REGEX.test(paramName)
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
return params;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Extracts all params from a route path.
|
|
223
|
+
*
|
|
224
|
+
* @param path - The route path (e.g., "/users/$userId/posts/$postId")
|
|
225
|
+
* @returns Array of extracted params with validation info
|
|
226
|
+
*/
|
|
227
|
+
function extractParamsFromPath(path) {
|
|
228
|
+
if (!path || !path.includes("$")) return [];
|
|
229
|
+
const segments = path.split("/");
|
|
230
|
+
const allParams = [];
|
|
231
|
+
for (const segment of segments) {
|
|
232
|
+
const params = extractParamsFromSegment(segment);
|
|
233
|
+
allParams.push(...params);
|
|
234
|
+
}
|
|
235
|
+
return allParams;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Gets all invalid params from a route path.
|
|
239
|
+
*
|
|
240
|
+
* @param path - The route path
|
|
241
|
+
* @returns Array of invalid param info
|
|
242
|
+
*/
|
|
243
|
+
function getInvalidParams(path) {
|
|
244
|
+
return extractParamsFromPath(path).filter((p) => !p.isValid);
|
|
245
|
+
}
|
|
246
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/route-param-names/route-param-names.rule.js
|
|
247
|
+
init_typescript_eslint_utils();
|
|
248
|
+
var createRule = import_eslint_utils.RuleCreator(getDocsUrl);
|
|
249
|
+
var pathAsFirstArgSet = new Set(pathAsFirstArgFunctions);
|
|
250
|
+
var pathAsPropertySet = new Set(pathAsPropertyFunctions);
|
|
251
|
+
var name = "route-param-names";
|
|
252
|
+
var rule = createRule({
|
|
253
|
+
name,
|
|
254
|
+
meta: {
|
|
255
|
+
type: "problem",
|
|
256
|
+
docs: {
|
|
257
|
+
description: "Ensure route param names are valid JavaScript identifiers",
|
|
258
|
+
recommended: "error"
|
|
259
|
+
},
|
|
260
|
+
messages: { invalidParamName: "Invalid param name \"{{paramName}}\" in route path. Param names must be valid JavaScript identifiers (match /[a-zA-Z_$][a-zA-Z0-9_$]*/)." },
|
|
261
|
+
schema: []
|
|
262
|
+
},
|
|
263
|
+
defaultOptions: [],
|
|
264
|
+
create: detectTanstackRouterImports((context, _, helpers) => {
|
|
265
|
+
function reportInvalidParams(node, path) {
|
|
266
|
+
const invalidParams = getInvalidParams(path);
|
|
267
|
+
for (const param of invalidParams) context.report({
|
|
268
|
+
node,
|
|
269
|
+
messageId: "invalidParamName",
|
|
270
|
+
data: { paramName: param.paramName }
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
function getStringLiteralValue(node) {
|
|
274
|
+
if (node.type === import_dist.AST_NODE_TYPES.Literal && typeof node.value === "string") return node.value;
|
|
275
|
+
if (node.type === import_dist.AST_NODE_TYPES.TemplateLiteral && node.quasis.length === 1) {
|
|
276
|
+
const cooked = node.quasis[0]?.value.cooked;
|
|
277
|
+
if (cooked != null) return cooked;
|
|
278
|
+
}
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
281
|
+
return { CallExpression(node) {
|
|
282
|
+
if (node.callee.type === import_dist.AST_NODE_TYPES.Identifier) {
|
|
283
|
+
const funcName = node.callee.name;
|
|
284
|
+
if (!helpers.isTanstackRouterImport(node.callee)) return;
|
|
285
|
+
if (pathAsPropertySet.has(funcName)) {
|
|
286
|
+
const arg = node.arguments[0];
|
|
287
|
+
if (arg?.type === import_dist.AST_NODE_TYPES.ObjectExpression) {
|
|
288
|
+
for (const prop of arg.properties) if (prop.type === import_dist.AST_NODE_TYPES.Property) {
|
|
289
|
+
if (prop.key.type === import_dist.AST_NODE_TYPES.Identifier && prop.key.name === "path" || prop.key.type === import_dist.AST_NODE_TYPES.Literal && prop.key.value === "path") {
|
|
290
|
+
const pathValue = getStringLiteralValue(prop.value);
|
|
291
|
+
if (pathValue) reportInvalidParams(prop.value, pathValue);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (node.callee.type === import_dist.AST_NODE_TYPES.CallExpression) {
|
|
299
|
+
const innerCall = node.callee;
|
|
300
|
+
if (innerCall.callee.type === import_dist.AST_NODE_TYPES.Identifier) {
|
|
301
|
+
const funcName = innerCall.callee.name;
|
|
302
|
+
if (!helpers.isTanstackRouterImport(innerCall.callee)) return;
|
|
303
|
+
if (pathAsFirstArgSet.has(funcName)) {
|
|
304
|
+
const pathArg = innerCall.arguments[0];
|
|
305
|
+
if (pathArg) {
|
|
306
|
+
const pathValue = getStringLiteralValue(pathArg);
|
|
307
|
+
if (pathValue) reportInvalidParams(pathArg, pathValue);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
} };
|
|
313
|
+
})
|
|
314
|
+
});
|
|
315
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/index.js
|
|
316
|
+
var plugin$1 = {
|
|
317
|
+
meta: { name: "@tanstack/eslint-plugin-router" },
|
|
318
|
+
configs: {},
|
|
319
|
+
rules: {
|
|
320
|
+
[name$1]: rule$1,
|
|
321
|
+
[name]: rule
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
Object.assign(plugin$1.configs, {
|
|
325
|
+
recommended: {
|
|
326
|
+
plugins: ["@tanstack/eslint-plugin-router"],
|
|
327
|
+
rules: {
|
|
328
|
+
"@tanstack/router/create-route-property-order": "warn",
|
|
329
|
+
"@tanstack/router/route-param-names": "error"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"flat/recommended": [{
|
|
333
|
+
plugins: { "@tanstack/router": plugin$1 },
|
|
334
|
+
rules: {
|
|
335
|
+
"@tanstack/router/create-route-property-order": "warn",
|
|
336
|
+
"@tanstack/router/route-param-names": "error"
|
|
337
|
+
}
|
|
338
|
+
}]
|
|
339
|
+
});
|
|
340
|
+
// src/tanstack-router.ts
|
|
341
|
+
const plugin = upstreamPlugin("tanstack-router", plugin$1, plainRules);
|
|
342
|
+
export { plugin as default };
|
|
343
|
+
|
|
344
|
+
//# sourceMappingURL=tanstack-router.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstack-router.mjs","names":["TSESTree","createRule","ESLintUtils","name","rule","AST_NODE_TYPES","ESLintUtils","AST_NODE_TYPES","name","rule","name$1","rule$1","plugin","tanstackRouter"],"sources":["../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/utils/get-docs-url.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/utils/detect-router-imports.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/create-route-property-order/create-route-property-order.utils.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/create-route-property-order/constants.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/create-route-property-order/create-route-property-order.rule.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/route-param-names/constants.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/route-param-names/route-param-names.utils.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules/route-param-names/route-param-names.rule.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__s_0b24167dfeb0f40e7ce2f48aa5258ebc/node_modules/@tanstack/eslint-plugin-router/dist/esm/index.js","../src/tanstack-router.ts"],"sourcesContent":["//#region src/utils/get-docs-url.ts\nvar getDocsUrl = (ruleName) => `https://tanstack.com/router/latest/docs/eslint/${ruleName}`;\n//#endregion\nexport { getDocsUrl };\n\n//# sourceMappingURL=get-docs-url.js.map","import { TSESTree } from \"@typescript-eslint/utils\";\n//#region src/utils/detect-router-imports.ts\nfunction detectTanstackRouterImports(create) {\n\treturn (context, optionsWithDefault) => {\n\t\tconst tanstackRouterImportSpecifiers = [];\n\t\tconst helpers = {\n\t\t\tisSpecificTanstackRouterImport(node, source) {\n\t\t\t\treturn !!tanstackRouterImportSpecifiers.find((specifier) => {\n\t\t\t\t\tif (specifier.type === TSESTree.AST_NODE_TYPES.ImportSpecifier && specifier.parent.type === TSESTree.AST_NODE_TYPES.ImportDeclaration && specifier.parent.source.value === source) return node.name === specifier.local.name;\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t},\n\t\t\tisTanstackRouterImport(node) {\n\t\t\t\treturn !!tanstackRouterImportSpecifiers.find((specifier) => {\n\t\t\t\t\tif (specifier.type === TSESTree.AST_NODE_TYPES.ImportSpecifier) return node.name === specifier.local.name;\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\tconst detectionInstructions = { ImportDeclaration(node) {\n\t\t\tif (node.specifiers.length > 0 && node.importKind !== \"type\" && node.source.value.startsWith(\"@tanstack/\") && node.source.value.endsWith(\"-router\")) tanstackRouterImportSpecifiers.push(...node.specifiers);\n\t\t} };\n\t\tconst ruleInstructions = create(context, optionsWithDefault, helpers);\n\t\tconst enhancedRuleInstructions = {};\n\t\tnew Set(Object.keys(detectionInstructions).concat(Object.keys(ruleInstructions))).forEach((instruction) => {\n\t\t\tenhancedRuleInstructions[instruction] = (node) => {\n\t\t\t\tif (instruction in detectionInstructions) detectionInstructions[instruction]?.(node);\n\t\t\t\tconst ruleFunction = ruleInstructions[instruction];\n\t\t\t\tif (ruleFunction !== void 0) return ruleFunction(node);\n\t\t\t};\n\t\t});\n\t\treturn enhancedRuleInstructions;\n\t};\n}\n//#endregion\nexport { detectTanstackRouterImports };\n\n//# sourceMappingURL=detect-router-imports.js.map","//#region src/rules/create-route-property-order/create-route-property-order.utils.ts\nfunction sortDataByOrder(data, orderRules, key) {\n\tconst getSubsetIndex = (item, subsets) => {\n\t\tfor (let i = 0; i < subsets.length; i++) if (subsets[i]?.includes(item)) return i;\n\t\treturn null;\n\t};\n\tconst orderSets = orderRules.reduce((sets, [A, B]) => [\n\t\t...sets,\n\t\tA,\n\t\tB\n\t], []);\n\tconst inOrderArray = data.filter((item) => getSubsetIndex(item[key], orderSets) !== null);\n\tlet wasResorted = false;\n\tconst inOrderIterator = inOrderArray.sort((a, b) => {\n\t\tconst aKey = a[key], bKey = b[key];\n\t\tconst aSubsetIndex = getSubsetIndex(aKey, orderSets);\n\t\tconst bSubsetIndex = getSubsetIndex(bKey, orderSets);\n\t\tif (aSubsetIndex !== null && bSubsetIndex !== null && aSubsetIndex !== bSubsetIndex) return aSubsetIndex - bSubsetIndex;\n\t\treturn 0;\n\t}).values();\n\tconst result = data.map((item) => {\n\t\tif (getSubsetIndex(item[key], orderSets) !== null) {\n\t\t\tconst sortedItem = inOrderIterator.next().value;\n\t\t\tif (sortedItem[key] !== item[key]) wasResorted = true;\n\t\t\treturn sortedItem;\n\t\t}\n\t\treturn item;\n\t});\n\tif (!wasResorted) return null;\n\treturn result;\n}\nfunction getCheckedProperties(orderRules) {\n\treturn [...new Set(orderRules.flat(2))];\n}\n//#endregion\nexport { getCheckedProperties, sortDataByOrder };\n\n//# sourceMappingURL=create-route-property-order.utils.js.map","import { getCheckedProperties } from \"./create-route-property-order.utils.js\";\n//#region src/rules/create-route-property-order/constants.ts\nvar createRouteFunctionsIndirect = [\"createFileRoute\", \"createRootRouteWithContext\"];\nvar createRouteFunctions = [...[\"createRootRoute\", \"createRoute\"], ...createRouteFunctionsIndirect];\nvar sortRules = [\n\t[[\"params\", \"validateSearch\"], [\"search\"]],\n\t[[\"search\"], [\"loaderDeps\", \"ssr\"]],\n\t[[\"loaderDeps\"], [\"context\"]],\n\t[[\"context\"], [\"beforeLoad\"]],\n\t[[\"beforeLoad\"], [\"loader\"]],\n\t[[\"loader\"], [\n\t\t\"onEnter\",\n\t\t\"onStay\",\n\t\t\"onLeave\",\n\t\t\"head\",\n\t\t\"scripts\",\n\t\t\"headers\",\n\t\t\"remountDeps\"\n\t]]\n];\ngetCheckedProperties(sortRules);\n//#endregion\nexport { createRouteFunctions, createRouteFunctionsIndirect, sortRules };\n\n//# sourceMappingURL=constants.js.map","import { getDocsUrl } from \"../../utils/get-docs-url.js\";\nimport { detectTanstackRouterImports } from \"../../utils/detect-router-imports.js\";\nimport { sortDataByOrder } from \"./create-route-property-order.utils.js\";\nimport { createRouteFunctions, createRouteFunctionsIndirect, sortRules } from \"./constants.js\";\nimport { AST_NODE_TYPES, ESLintUtils } from \"@typescript-eslint/utils\";\n//#region src/rules/create-route-property-order/create-route-property-order.rule.ts\nvar createRule = ESLintUtils.RuleCreator(getDocsUrl);\nvar createRouteFunctionSet = new Set(createRouteFunctions);\nfunction isCreateRouteFunction(node) {\n\treturn createRouteFunctionSet.has(node);\n}\nvar name = \"create-route-property-order\";\nvar rule = createRule({\n\tname,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Ensure correct order of inference sensitive properties for createRoute functions\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tmessages: { invalidOrder: \"Invalid order of properties for `{{function}}`.\" },\n\t\tschema: [],\n\t\thasSuggestions: true,\n\t\tfixable: \"code\"\n\t},\n\tdefaultOptions: [],\n\tcreate: detectTanstackRouterImports((context) => {\n\t\treturn { CallExpression(node) {\n\t\t\tif (node.callee.type !== AST_NODE_TYPES.Identifier) return;\n\t\t\tconst createRouteFunction = node.callee.name;\n\t\t\tif (!isCreateRouteFunction(createRouteFunction)) return;\n\t\t\tlet args = node.arguments;\n\t\t\tif (createRouteFunctionsIndirect.includes(createRouteFunction)) if (node.parent.type === AST_NODE_TYPES.CallExpression) args = node.parent.arguments;\n\t\t\telse return;\n\t\t\tconst argument = args[0];\n\t\t\tif (argument === void 0 || argument.type !== \"ObjectExpression\") return;\n\t\t\tconst allProperties = argument.properties;\n\t\t\tif (allProperties.length < 2) return;\n\t\t\tconst sortedProperties = sortDataByOrder(allProperties.flatMap((p) => {\n\t\t\t\tif (p.type === AST_NODE_TYPES.Property && p.key.type === AST_NODE_TYPES.Identifier) return {\n\t\t\t\t\tname: p.key.name,\n\t\t\t\t\tproperty: p\n\t\t\t\t};\n\t\t\t\telse if (p.type === AST_NODE_TYPES.SpreadElement) if (p.argument.type === AST_NODE_TYPES.Identifier) return {\n\t\t\t\t\tname: p.argument.name,\n\t\t\t\t\tproperty: p\n\t\t\t\t};\n\t\t\t\telse throw new Error(\"Unsupported spread element\");\n\t\t\t\treturn [];\n\t\t\t}), sortRules, \"name\");\n\t\t\tif (sortedProperties === null) return;\n\t\t\tcontext.report({\n\t\t\t\tnode: argument,\n\t\t\t\tdata: { function: node.callee.name },\n\t\t\t\tmessageId: \"invalidOrder\",\n\t\t\t\tfix(fixer) {\n\t\t\t\t\tconst sourceCode = context.sourceCode;\n\t\t\t\t\tconst text = sortedProperties.reduce((sourceText, specifier, index) => {\n\t\t\t\t\t\tlet text = \"\";\n\t\t\t\t\t\tif (index < allProperties.length - 1) text = sourceCode.getText().slice(allProperties[index].range[1], allProperties[index + 1].range[0]);\n\t\t\t\t\t\treturn sourceText + sourceCode.getText(specifier.property) + text;\n\t\t\t\t\t}, \"\");\n\t\t\t\t\treturn fixer.replaceTextRange([allProperties[0].range[0], allProperties.at(-1).range[1]], text);\n\t\t\t\t}\n\t\t\t});\n\t\t} };\n\t})\n});\n//#endregion\nexport { name, rule };\n\n//# sourceMappingURL=create-route-property-order.rule.js.map","//#region src/rules/route-param-names/constants.ts\n/**\n* Functions where the path is passed as the first argument (string literal)\n* e.g., createFileRoute('/path/$param')(...)\n*/\nvar pathAsFirstArgFunctions = [\n\t\"createFileRoute\",\n\t\"createLazyFileRoute\",\n\t\"createLazyRoute\"\n];\n/**\n* Functions where the path is a property in the options object\n* e.g., createRoute({ path: '/path/$param' })\n*/\nvar pathAsPropertyFunctions = [\"createRoute\"];\n[...pathAsFirstArgFunctions, ...pathAsPropertyFunctions];\n/**\n* Regex for valid JavaScript identifier (param name)\n* Must start with letter, underscore, or dollar sign\n* Can contain letters, numbers, underscores, or dollar signs\n*/\nvar VALID_PARAM_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;\n//#endregion\nexport { VALID_PARAM_NAME_REGEX, pathAsFirstArgFunctions, pathAsPropertyFunctions };\n\n//# sourceMappingURL=constants.js.map","import { VALID_PARAM_NAME_REGEX } from \"./constants.js\";\n//#region src/rules/route-param-names/route-param-names.utils.ts\n/**\n* Extracts param names from a route path segment.\n*\n* Handles these patterns:\n* - $paramName -> extract \"paramName\"\n* - {$paramName} -> extract \"paramName\"\n* - prefix{$paramName}suffix -> extract \"paramName\"\n* - {-$paramName} -> extract \"paramName\" (optional)\n* - prefix{-$paramName}suffix -> extract \"paramName\" (optional)\n* - $ or {$} -> wildcard, skip validation\n*/\nfunction extractParamsFromSegment(segment) {\n\tconst params = [];\n\tif (!segment || !segment.includes(\"$\")) return params;\n\tif (segment === \"$\" || segment === \"{$}\") return params;\n\tif (segment.startsWith(\"$\") && !segment.includes(\"{\")) {\n\t\tconst paramName = segment.slice(1);\n\t\tif (paramName) params.push({\n\t\t\tfullParam: segment,\n\t\t\tparamName,\n\t\t\tisOptional: false,\n\t\t\tisValid: VALID_PARAM_NAME_REGEX.test(paramName)\n\t\t});\n\t\treturn params;\n\t}\n\tconst bracePattern = /\\{(-?\\$)([^}]*)\\}/g;\n\tlet match;\n\twhile ((match = bracePattern.exec(segment)) !== null) {\n\t\tconst prefix = match[1];\n\t\tconst paramName = match[2];\n\t\tif (!paramName) continue;\n\t\tconst isOptional = prefix === \"-$\";\n\t\tparams.push({\n\t\t\tfullParam: `${prefix}${paramName}`,\n\t\t\tparamName,\n\t\t\tisOptional,\n\t\t\tisValid: VALID_PARAM_NAME_REGEX.test(paramName)\n\t\t});\n\t}\n\treturn params;\n}\n/**\n* Extracts all params from a route path.\n*\n* @param path - The route path (e.g., \"/users/$userId/posts/$postId\")\n* @returns Array of extracted params with validation info\n*/\nfunction extractParamsFromPath(path) {\n\tif (!path || !path.includes(\"$\")) return [];\n\tconst segments = path.split(\"/\");\n\tconst allParams = [];\n\tfor (const segment of segments) {\n\t\tconst params = extractParamsFromSegment(segment);\n\t\tallParams.push(...params);\n\t}\n\treturn allParams;\n}\n/**\n* Gets all invalid params from a route path.\n*\n* @param path - The route path\n* @returns Array of invalid param info\n*/\nfunction getInvalidParams(path) {\n\treturn extractParamsFromPath(path).filter((p) => !p.isValid);\n}\n//#endregion\nexport { getInvalidParams };\n\n//# sourceMappingURL=route-param-names.utils.js.map","import { getDocsUrl } from \"../../utils/get-docs-url.js\";\nimport { detectTanstackRouterImports } from \"../../utils/detect-router-imports.js\";\nimport { pathAsFirstArgFunctions, pathAsPropertyFunctions } from \"./constants.js\";\nimport { getInvalidParams } from \"./route-param-names.utils.js\";\nimport { AST_NODE_TYPES, ESLintUtils } from \"@typescript-eslint/utils\";\n//#region src/rules/route-param-names/route-param-names.rule.ts\nvar createRule = ESLintUtils.RuleCreator(getDocsUrl);\nvar pathAsFirstArgSet = new Set(pathAsFirstArgFunctions);\nvar pathAsPropertySet = new Set(pathAsPropertyFunctions);\nvar name = \"route-param-names\";\nvar rule = createRule({\n\tname,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Ensure route param names are valid JavaScript identifiers\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tmessages: { invalidParamName: \"Invalid param name \\\"{{paramName}}\\\" in route path. Param names must be valid JavaScript identifiers (match /[a-zA-Z_$][a-zA-Z0-9_$]*/).\" },\n\t\tschema: []\n\t},\n\tdefaultOptions: [],\n\tcreate: detectTanstackRouterImports((context, _, helpers) => {\n\t\tfunction reportInvalidParams(node, path) {\n\t\t\tconst invalidParams = getInvalidParams(path);\n\t\t\tfor (const param of invalidParams) context.report({\n\t\t\t\tnode,\n\t\t\t\tmessageId: \"invalidParamName\",\n\t\t\t\tdata: { paramName: param.paramName }\n\t\t\t});\n\t\t}\n\t\tfunction getStringLiteralValue(node) {\n\t\t\tif (node.type === AST_NODE_TYPES.Literal && typeof node.value === \"string\") return node.value;\n\t\t\tif (node.type === AST_NODE_TYPES.TemplateLiteral && node.quasis.length === 1) {\n\t\t\t\tconst cooked = node.quasis[0]?.value.cooked;\n\t\t\t\tif (cooked != null) return cooked;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\treturn { CallExpression(node) {\n\t\t\tif (node.callee.type === AST_NODE_TYPES.Identifier) {\n\t\t\t\tconst funcName = node.callee.name;\n\t\t\t\tif (!helpers.isTanstackRouterImport(node.callee)) return;\n\t\t\t\tif (pathAsPropertySet.has(funcName)) {\n\t\t\t\t\tconst arg = node.arguments[0];\n\t\t\t\t\tif (arg?.type === AST_NODE_TYPES.ObjectExpression) {\n\t\t\t\t\t\tfor (const prop of arg.properties) if (prop.type === AST_NODE_TYPES.Property) {\n\t\t\t\t\t\t\tif (prop.key.type === AST_NODE_TYPES.Identifier && prop.key.name === \"path\" || prop.key.type === AST_NODE_TYPES.Literal && prop.key.value === \"path\") {\n\t\t\t\t\t\t\t\tconst pathValue = getStringLiteralValue(prop.value);\n\t\t\t\t\t\t\t\tif (pathValue) reportInvalidParams(prop.value, pathValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (node.callee.type === AST_NODE_TYPES.CallExpression) {\n\t\t\t\tconst innerCall = node.callee;\n\t\t\t\tif (innerCall.callee.type === AST_NODE_TYPES.Identifier) {\n\t\t\t\t\tconst funcName = innerCall.callee.name;\n\t\t\t\t\tif (!helpers.isTanstackRouterImport(innerCall.callee)) return;\n\t\t\t\t\tif (pathAsFirstArgSet.has(funcName)) {\n\t\t\t\t\t\tconst pathArg = innerCall.arguments[0];\n\t\t\t\t\t\tif (pathArg) {\n\t\t\t\t\t\t\tconst pathValue = getStringLiteralValue(pathArg);\n\t\t\t\t\t\t\tif (pathValue) reportInvalidParams(pathArg, pathValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} };\n\t})\n});\n//#endregion\nexport { name, rule };\n\n//# sourceMappingURL=route-param-names.rule.js.map","import { name, rule } from \"./rules/create-route-property-order/create-route-property-order.rule.js\";\nimport { name as name$1, rule as rule$1 } from \"./rules/route-param-names/route-param-names.rule.js\";\n//#region src/rules.ts\nvar rules = {\n\t[name]: rule,\n\t[name$1]: rule$1\n};\n//#endregion\nexport { rules };\n\n//# sourceMappingURL=rules.js.map","import { rules } from \"./rules.js\";\n//#region src/index.ts\nvar plugin = {\n\tmeta: { name: \"@tanstack/eslint-plugin-router\" },\n\tconfigs: {},\n\trules\n};\nObject.assign(plugin.configs, {\n\trecommended: {\n\t\tplugins: [\"@tanstack/eslint-plugin-router\"],\n\t\trules: {\n\t\t\t\"@tanstack/router/create-route-property-order\": \"warn\",\n\t\t\t\"@tanstack/router/route-param-names\": \"error\"\n\t\t}\n\t},\n\t\"flat/recommended\": [{\n\t\tplugins: { \"@tanstack/router\": plugin },\n\t\trules: {\n\t\t\t\"@tanstack/router/create-route-property-order\": \"warn\",\n\t\t\t\"@tanstack/router/route-param-names\": \"error\"\n\t\t}\n\t}]\n});\n//#endregion\nexport { plugin as default };\n\n//# sourceMappingURL=index.js.map","import tanstackRouter from \"@tanstack/eslint-plugin-router\";\n\nimport { plainRules, upstreamPlugin } from \"./upstream-plugin.ts\";\nimport type { UpstreamPlugin } from \"./upstream-plugin.ts\";\n\ntype ConfigName = \"recommended\" | \"flat/recommended\";\n\nconst plugin: UpstreamPlugin<ConfigName> = upstreamPlugin(\n \"tanstack-router\",\n tanstackRouter,\n plainRules,\n);\n\nexport type { ConfigName };\nexport default plugin;\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9],"mappings":";;;AACA,IAAI,cAAc,aAAa,kDAAkD;;ACD9B,6BAAA;AAEnD,SAAS,4BAA4B,QAAQ;CAC5C,QAAQ,SAAS,uBAAuB;EACvC,MAAM,iCAAiC,CAAC;EACxC,MAAM,UAAU;GACf,+BAA+B,MAAM,QAAQ;IAC5C,OAAO,CAAC,CAAC,+BAA+B,MAAM,cAAc;KAC3D,IAAI,UAAU,SAASA,YAAAA,SAAS,eAAe,mBAAmB,UAAU,OAAO,SAASA,YAAAA,SAAS,eAAe,qBAAqB,UAAU,OAAO,OAAO,UAAU,QAAQ,OAAO,KAAK,SAAS,UAAU,MAAM;KACxN,OAAO;IACR,CAAC;GACF;GACA,uBAAuB,MAAM;IAC5B,OAAO,CAAC,CAAC,+BAA+B,MAAM,cAAc;KAC3D,IAAI,UAAU,SAASA,YAAAA,SAAS,eAAe,iBAAiB,OAAO,KAAK,SAAS,UAAU,MAAM;KACrG,OAAO;IACR,CAAC;GACF;EACD;EACA,MAAM,wBAAwB,EAAE,kBAAkB,MAAM;GACvD,IAAI,KAAK,WAAW,SAAS,KAAK,KAAK,eAAe,UAAU,KAAK,OAAO,MAAM,WAAW,YAAY,KAAK,KAAK,OAAO,MAAM,SAAS,SAAS,GAAG,+BAA+B,KAAK,GAAG,KAAK,UAAU;EAC5M,EAAE;EACF,MAAM,mBAAmB,OAAO,SAAS,oBAAoB,OAAO;EACpE,MAAM,2BAA2B,CAAC;EAClC,IAAI,IAAI,OAAO,KAAK,qBAAqB,CAAC,CAAC,OAAO,OAAO,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS,gBAAgB;GAC1G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