@r_masseater/oxlint-typed-rules 0.4.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/dist/config-rules-Buk48gLL.mjs +6 -0
- package/dist/config-rules-Buk48gLL.mjs.map +1 -0
- package/dist/drizzle.mjs +2 -2
- package/dist/{eslint-utils-ujGlgEMD.mjs → eslint-utils-BF_HFO08.mjs} +14 -14
- package/dist/{eslint-utils-ujGlgEMD.mjs.map → eslint-utils-BF_HFO08.mjs.map} +1 -1
- package/dist/index.d.mts +9 -8
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +311 -322
- package/dist/react.mjs.map +1 -1
- package/dist/remotion.mjs +3 -3
- package/dist/remotion.mjs.map +1 -1
- package/dist/tanstack-query.mjs +199 -199
- package/dist/tanstack-query.mjs.map +1 -1
- package/dist/tanstack-router.mjs +11 -11
- package/dist/tanstack-router.mjs.map +1 -1
- package/dist/tanstack-start.mjs +35 -34
- package/dist/tanstack-start.mjs.map +1 -1
- package/dist/{typed-rule-DFpV2XgE.mjs → typed-rule-FCRt1nKZ.mjs} +25 -52
- package/dist/typed-rule-FCRt1nKZ.mjs.map +1 -0
- package/dist/{typescript-eslint-utils-C6OO2FjX.mjs → typescript-eslint-utils-C7ew0-XM.mjs} +2 -2
- package/dist/{typescript-eslint-utils-C6OO2FjX.mjs.map → typescript-eslint-utils-C7ew0-XM.mjs.map} +1 -1
- package/dist/{upstream-plugin-D4Lz9A1H.mjs → upstream-plugin-eT7t_K7e.mjs} +3 -4
- package/dist/upstream-plugin-eT7t_K7e.mjs.map +1 -0
- package/dist/version-BMMFrB-m.mjs +83 -0
- package/dist/version-BMMFrB-m.mjs.map +1 -0
- package/package.json +28 -27
- package/skills/run-typed-eslint-rules/SKILL.md +30 -2
- package/dist/ts-compat-CFDky9Ie.mjs +0 -132
- package/dist/ts-compat-CFDky9Ie.mjs.map +0 -1
- package/dist/typed-rule-DFpV2XgE.mjs.map +0 -1
- package/dist/upstream-plugin-D4Lz9A1H.mjs.map +0 -1
|
@@ -1 +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@10.15.0_jiti@2.7.0_supports-color@10.2.2__c29f867d9f210c07ad16dc3fe380ec7c/node_modules/@tanstack/eslint-plugin-router/dist/esm/utils/get-docs-url.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@10.15.0_jiti@2.7.0_supports-color@10.2.2__c29f867d9f210c07ad16dc3fe380ec7c/node_modules/@tanstack/eslint-plugin-router/dist/esm/utils/detect-router-imports.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@10.15.0_jiti@2.7.0_supports-color@10.2.2__c29f867d9f210c07ad16dc3fe380ec7c/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__c29f867d9f210c07ad16dc3fe380ec7c/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__c29f867d9f210c07ad16dc3fe380ec7c/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__c29f867d9f210c07ad16dc3fe380ec7c/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__c29f867d9f210c07ad16dc3fe380ec7c/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__c29f867d9f210c07ad16dc3fe380ec7c/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__c29f867d9f210c07ad16dc3fe380ec7c/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@10.15.0_jiti@2.7.0_supports-color@10.2.2__c29f867d9f210c07ad16dc3fe380ec7c/node_modules/@tanstack/eslint-plugin-router/dist/esm/index.js","../src/app/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 \"#/entities/upstream-plugin/index.ts\";\nimport type { UpstreamPlugin } from \"#/entities/upstream-plugin/index.ts\";\n\nexport type ConfigName = \"recommended\" | \"flat/recommended\";\n\nconst plugin: UpstreamPlugin<ConfigName> = upstreamPlugin(\n \"tanstack-router\",\n tanstackRouter,\n plainRules,\n);\n\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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AAsC;EACvC;CACD,CAAC;AACF,CAAC;;ACfD,MAAM,SAAqC,eACzC,mBACAC,UACA,UACF"}
|
|
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@10.15.0_jiti@2.7.0_supports-color@10.2.2__441cdb8a58f7bb057347bf65d1e8ca5a/node_modules/@tanstack/eslint-plugin-router/dist/esm/utils/get-docs-url.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@10.15.0_jiti@2.7.0_supports-color@10.2.2__441cdb8a58f7bb057347bf65d1e8ca5a/node_modules/@tanstack/eslint-plugin-router/dist/esm/utils/detect-router-imports.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@10.15.0_jiti@2.7.0_supports-color@10.2.2__441cdb8a58f7bb057347bf65d1e8ca5a/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__441cdb8a58f7bb057347bf65d1e8ca5a/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__441cdb8a58f7bb057347bf65d1e8ca5a/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__441cdb8a58f7bb057347bf65d1e8ca5a/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__441cdb8a58f7bb057347bf65d1e8ca5a/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__441cdb8a58f7bb057347bf65d1e8ca5a/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@10.15.0_jiti@2.7.0_supports-color@10.2.2__441cdb8a58f7bb057347bf65d1e8ca5a/node_modules/@tanstack/eslint-plugin-router/dist/esm/rules.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-router@1.162.0_eslint@10.15.0_jiti@2.7.0_supports-color@10.2.2__441cdb8a58f7bb057347bf65d1e8ca5a/node_modules/@tanstack/eslint-plugin-router/dist/esm/index.js","../src/app/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 \"#/entities/upstream-plugin/index.ts\";\nimport type { UpstreamPlugin } from \"#/entities/upstream-plugin/index.ts\";\n\nexport type ConfigName = \"recommended\" | \"flat/recommended\";\n\nconst plugin: UpstreamPlugin<ConfigName> = upstreamPlugin(\n \"tanstack-router\",\n tanstackRouter,\n plainRules,\n);\n\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,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gD;GAChD,sCAAsC;EACvC;CACD,CAAC;AACF,CAAC;;ACfD,MAAM,SAAqC,eACzC,mBACAC,UACA,UACF"}
|
package/dist/tanstack-start.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { a as __toESM, t as __commonJSMin } from "./rolldown-runtime-DQp2zzRu.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as import_eslint_utils, r as init_typescript_eslint_utils } from "./typescript-eslint-utils-
|
|
4
|
-
import { r as typedRules } from "./typed-rule-
|
|
2
|
+
import { t as require_version } from "./version-BMMFrB-m.mjs";
|
|
3
|
+
import { n as import_eslint_utils, r as init_typescript_eslint_utils } from "./typescript-eslint-utils-C7ew0-XM.mjs";
|
|
4
|
+
import { r as typedRules } from "./typed-rule-FCRt1nKZ.mjs";
|
|
5
5
|
import path from "node:path";
|
|
6
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
6
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/utils/get-docs-url.js
|
|
7
7
|
var getDocsUrl = (ruleName) => `https://tanstack.com/start/latest/docs/eslint/${ruleName}`;
|
|
8
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
8
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/shared/use-client-resolver.js
|
|
9
|
+
var import_version = /* @__PURE__ */ __toESM(require_version(), 1);
|
|
9
10
|
/**
|
|
10
11
|
* Creates a resolver that checks for 'use client' directive in source files
|
|
11
12
|
*/
|
|
@@ -15,7 +16,7 @@ function createUseClientResolver(program) {
|
|
|
15
16
|
if (!sourceFile) return false;
|
|
16
17
|
const firstStmt = sourceFile.statements[0];
|
|
17
18
|
if (!firstStmt) return false;
|
|
18
|
-
if (isExpressionStatement(firstStmt) && isStringLiteral(firstStmt.expression)) return firstStmt.expression.text === "use client";
|
|
19
|
+
if (import_version.isExpressionStatement(firstStmt) && import_version.isStringLiteral(firstStmt.expression)) return firstStmt.expression.text === "use client";
|
|
19
20
|
return false;
|
|
20
21
|
}
|
|
21
22
|
return { hasUseClientDirective };
|
|
@@ -3325,7 +3326,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3325
3326
|
}
|
|
3326
3327
|
};
|
|
3327
3328
|
}));
|
|
3328
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
3329
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/constants.js
|
|
3329
3330
|
var import_globals = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3330
3331
|
module.exports = require_globals$1();
|
|
3331
3332
|
})))(), 1);
|
|
@@ -3525,7 +3526,7 @@ function isClientOnlyHook(name, allowedHooks = DEFAULT_ALLOWED_HOOKS) {
|
|
|
3525
3526
|
if (allowedHooks.has(name)) return false;
|
|
3526
3527
|
return true;
|
|
3527
3528
|
}
|
|
3528
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
3529
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/violation-detector.js
|
|
3529
3530
|
/**
|
|
3530
3531
|
* Get line and column position for a node
|
|
3531
3532
|
*/
|
|
@@ -3676,7 +3677,7 @@ function createViolationDetector(tsLib, options = {}) {
|
|
|
3676
3677
|
detectViolationsInNode
|
|
3677
3678
|
};
|
|
3678
3679
|
}
|
|
3679
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
3680
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/transitive-analyzer.js
|
|
3680
3681
|
/**
|
|
3681
3682
|
* Creates an analyzer that follows reachable symbol references
|
|
3682
3683
|
* to find transitive violations, stopping at 'use client' boundaries.
|
|
@@ -3787,7 +3788,7 @@ function createTransitiveAnalyzer(tsLib, program, checker, useClientResolver, vi
|
|
|
3787
3788
|
}
|
|
3788
3789
|
return { analyzeEntrySymbol };
|
|
3789
3790
|
}
|
|
3790
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
3791
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/no-client-code-in-server-component.rule.js
|
|
3791
3792
|
init_typescript_eslint_utils();
|
|
3792
3793
|
var name$1 = "no-client-code-in-server-component";
|
|
3793
3794
|
var TRIGGER_HINT = "Triggered by rendering \"{{entry}}\".";
|
|
@@ -3823,11 +3824,11 @@ var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
3823
3824
|
const checker = program.getTypeChecker();
|
|
3824
3825
|
const allowedHooks = /* @__PURE__ */ new Set([...DEFAULT_ALLOWED_HOOKS, ...options.allowedServerHooks]);
|
|
3825
3826
|
const useClientResolver = createUseClientResolver(program);
|
|
3826
|
-
const violationDetector = createViolationDetector(
|
|
3827
|
+
const violationDetector = createViolationDetector(import_version, {
|
|
3827
3828
|
allowedHooks,
|
|
3828
3829
|
checker
|
|
3829
3830
|
});
|
|
3830
|
-
const transitiveAnalyzer = createTransitiveAnalyzer(
|
|
3831
|
+
const transitiveAnalyzer = createTransitiveAnalyzer(import_version, program, checker, useClientResolver, violationDetector);
|
|
3831
3832
|
return { CallExpression(node) {
|
|
3832
3833
|
const sourceFile = services.esTreeNodeToTSNodeMap.get(node).getSourceFile();
|
|
3833
3834
|
if (useClientResolver.hasUseClientDirective(sourceFile.fileName)) return;
|
|
@@ -3837,8 +3838,8 @@ var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
3837
3838
|
const callback = node.arguments[0];
|
|
3838
3839
|
if (!callback) return;
|
|
3839
3840
|
const tsNode = services.esTreeNodeToTSNodeMap.get(callback);
|
|
3840
|
-
if (isFunctionLike(tsNode)) analyzeServerComponentCallback(tsNode, node, rootKind);
|
|
3841
|
-
else if (isIdentifier(tsNode)) analyzeDirectComponentReference(tsNode, node, rootKind);
|
|
3841
|
+
if (import_version.isFunctionLike(tsNode)) analyzeServerComponentCallback(tsNode, node, rootKind);
|
|
3842
|
+
else if (import_version.isIdentifier(tsNode)) analyzeDirectComponentReference(tsNode, node, rootKind);
|
|
3842
3843
|
return;
|
|
3843
3844
|
}
|
|
3844
3845
|
const element = node.arguments[0];
|
|
@@ -3876,7 +3877,7 @@ var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
3876
3877
|
for (const ref of componentRefs) {
|
|
3877
3878
|
const symbol = checker.getSymbolAtLocation(ref);
|
|
3878
3879
|
if (!symbol) continue;
|
|
3879
|
-
const resolvedSymbol = SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;
|
|
3880
|
+
const resolvedSymbol = import_version.SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;
|
|
3880
3881
|
const result = transitiveAnalyzer.analyzeEntrySymbol(resolvedSymbol);
|
|
3881
3882
|
if (result.isClientBoundary) continue;
|
|
3882
3883
|
for (const violation of result.violations) {
|
|
@@ -3915,7 +3916,7 @@ var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
3915
3916
|
const symbol = checker.getSymbolAtLocation(ref);
|
|
3916
3917
|
if (!symbol) continue;
|
|
3917
3918
|
if (symbol.getDeclarations()?.some((d) => isWithinParameters(d, callback))) continue;
|
|
3918
|
-
const resolvedSymbol = SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;
|
|
3919
|
+
const resolvedSymbol = import_version.SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;
|
|
3919
3920
|
const result = transitiveAnalyzer.analyzeEntrySymbol(resolvedSymbol);
|
|
3920
3921
|
if (result.isClientBoundary) continue;
|
|
3921
3922
|
for (const violation of result.violations) {
|
|
@@ -3933,7 +3934,7 @@ var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
3933
3934
|
function analyzeDirectComponentReference(ref, eslintNode, rootKind = "createCompositeComponent") {
|
|
3934
3935
|
const symbol = checker.getSymbolAtLocation(ref);
|
|
3935
3936
|
if (!symbol) return;
|
|
3936
|
-
const resolvedSymbol = SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;
|
|
3937
|
+
const resolvedSymbol = import_version.SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;
|
|
3937
3938
|
const result = transitiveAnalyzer.analyzeEntrySymbol(resolvedSymbol);
|
|
3938
3939
|
if (result.isClientBoundary) return;
|
|
3939
3940
|
const reportedViolations = /* @__PURE__ */ new Set();
|
|
@@ -3950,10 +3951,10 @@ var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
3950
3951
|
*/
|
|
3951
3952
|
function collectParameterBindings(bindingName, names) {
|
|
3952
3953
|
function collectFromBinding(node) {
|
|
3953
|
-
if (isIdentifier(node)) names.add(node.text);
|
|
3954
|
-
else if (isObjectBindingPattern(node)) for (const element of node.elements) collectFromBinding(element.name);
|
|
3955
|
-
else if (isArrayBindingPattern(node)) {
|
|
3956
|
-
for (const element of node.elements) if (isBindingElement(element)) collectFromBinding(element.name);
|
|
3954
|
+
if (import_version.isIdentifier(node)) names.add(node.text);
|
|
3955
|
+
else if (import_version.isObjectBindingPattern(node)) for (const element of node.elements) collectFromBinding(element.name);
|
|
3956
|
+
else if (import_version.isArrayBindingPattern(node)) {
|
|
3957
|
+
for (const element of node.elements) if (import_version.isBindingElement(element)) collectFromBinding(element.name);
|
|
3957
3958
|
}
|
|
3958
3959
|
}
|
|
3959
3960
|
collectFromBinding(bindingName);
|
|
@@ -3964,9 +3965,9 @@ var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
3964
3965
|
function isWithinParameters(decl, callback) {
|
|
3965
3966
|
let current = decl;
|
|
3966
3967
|
while (current) {
|
|
3967
|
-
if (isParameter(current)) {
|
|
3968
|
+
if (import_version.isParameter(current)) {
|
|
3968
3969
|
const paramParent = current.parent;
|
|
3969
|
-
if (isFunctionLike(paramParent) && paramParent === callback) return true;
|
|
3970
|
+
if (import_version.isFunctionLike(paramParent) && paramParent === callback) return true;
|
|
3970
3971
|
}
|
|
3971
3972
|
current = current.parent;
|
|
3972
3973
|
}
|
|
@@ -3975,15 +3976,15 @@ var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
3975
3976
|
function findComponentReferences(node) {
|
|
3976
3977
|
const refs = [];
|
|
3977
3978
|
function visit(n) {
|
|
3978
|
-
if (isJsxOpeningElement(n) || isJsxSelfClosingElement(n)) {
|
|
3979
|
+
if (import_version.isJsxOpeningElement(n) || import_version.isJsxSelfClosingElement(n)) {
|
|
3979
3980
|
const tagName = n.tagName;
|
|
3980
|
-
if (isIdentifier(tagName) && /^[A-Z]/.test(tagName.text)) refs.push(tagName);
|
|
3981
|
+
if (import_version.isIdentifier(tagName) && /^[A-Z]/.test(tagName.text)) refs.push(tagName);
|
|
3981
3982
|
}
|
|
3982
|
-
if (isCallExpression(n)) {
|
|
3983
|
+
if (import_version.isCallExpression(n)) {
|
|
3983
3984
|
const callee = n.expression;
|
|
3984
|
-
if (isIdentifier(callee) && /^[A-Z]/.test(callee.text)) refs.push(callee);
|
|
3985
|
+
if (import_version.isIdentifier(callee) && /^[A-Z]/.test(callee.text)) refs.push(callee);
|
|
3985
3986
|
}
|
|
3986
|
-
forEachChild(n, visit);
|
|
3987
|
+
import_version.forEachChild(n, visit);
|
|
3987
3988
|
}
|
|
3988
3989
|
visit(node);
|
|
3989
3990
|
return refs;
|
|
@@ -4021,7 +4022,7 @@ var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
4021
4022
|
}
|
|
4022
4023
|
}
|
|
4023
4024
|
});
|
|
4024
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
4025
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/constants.js
|
|
4025
4026
|
/**
|
|
4026
4027
|
* Route option names that accept component references.
|
|
4027
4028
|
* These make the referenced component a "client root".
|
|
@@ -4044,7 +4045,7 @@ var ROUTE_CREATOR_NAMES = [
|
|
|
4044
4045
|
* Function names that create server-component roots.
|
|
4045
4046
|
*/
|
|
4046
4047
|
var SERVER_COMPONENT_ROOTS = ["renderServerComponent", "createCompositeComponent"];
|
|
4047
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
4048
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/render-graph-builder.js
|
|
4048
4049
|
/**
|
|
4049
4050
|
* Builds a render graph from the TypeScript program.
|
|
4050
4051
|
* Indexes components, JSX edges, server roots, and client roots.
|
|
@@ -4314,7 +4315,7 @@ function createRenderGraphBuilder(tsLib, program, checker) {
|
|
|
4314
4315
|
set.add(key);
|
|
4315
4316
|
}
|
|
4316
4317
|
}
|
|
4317
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
4318
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/context-analyzer.js
|
|
4318
4319
|
/**
|
|
4319
4320
|
* Analyzes the render graph to propagate server/client context.
|
|
4320
4321
|
*
|
|
@@ -4414,7 +4415,7 @@ function propagateClientContext(key, visited, contexts, adjacency, reason) {
|
|
|
4414
4415
|
parentFile: ctx.component.fileName
|
|
4415
4416
|
});
|
|
4416
4417
|
}
|
|
4417
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
4418
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/no-async-client-component.rule.js
|
|
4418
4419
|
init_typescript_eslint_utils();
|
|
4419
4420
|
var name = "no-async-client-component";
|
|
4420
4421
|
var perProgramCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -4452,7 +4453,7 @@ var rule = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
4452
4453
|
let cached = perProgramCache.get(program);
|
|
4453
4454
|
if (!cached) {
|
|
4454
4455
|
cached = {
|
|
4455
|
-
builder: createRenderGraphBuilder(
|
|
4456
|
+
builder: createRenderGraphBuilder(import_version, program, checker),
|
|
4456
4457
|
graphBuilt: false
|
|
4457
4458
|
};
|
|
4458
4459
|
perProgramCache.set(program, cached);
|
|
@@ -4632,7 +4633,7 @@ var rule = import_eslint_utils.RuleCreator(getDocsUrl)({
|
|
|
4632
4633
|
}
|
|
4633
4634
|
}
|
|
4634
4635
|
});
|
|
4635
|
-
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=
|
|
4636
|
+
// ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_9ec771d00384a7375bb791be44ae6cb8/node_modules/@tanstack/eslint-plugin-start/dist/esm/index.js
|
|
4636
4637
|
var plugin$1 = {
|
|
4637
4638
|
meta: { name: "@tanstack/eslint-plugin-start" },
|
|
4638
4639
|
configs: {},
|