@opsydyn/oxlint-effect 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["call"],"sources":["../src/index.ts"],"sourcesContent":["import { definePlugin, defineRule } from \"@oxlint/plugins\";\nimport type { Context as OxlintContext, ESTree } from \"@oxlint/plugins\";\n\ntype Node = {\n type?: string;\n [key: string]: unknown;\n};\n\nfunction isIdentifier(node: unknown, name?: string): node is Node & { name: string } {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"Identifier\" &&\n typeof (node as Node).name === \"string\" &&\n (name === undefined || (node as Node).name === name)\n );\n}\n\nfunction isMemberExpression(node: unknown, objectName: string, propertyName: string): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const member = node as Node;\n return (\n member.type === \"MemberExpression\" &&\n member.computed !== true &&\n isIdentifier(member.object, objectName) &&\n isIdentifier(member.property, propertyName)\n );\n}\n\nfunction isEffectMemberCall(node: unknown): node is Node & { arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n Array.isArray(call.arguments) &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"MemberExpression\" &&\n (call.callee as Node).computed !== true &&\n isIdentifier((call.callee as Node).object, \"Effect\") &&\n isIdentifier((call.callee as Node).property)\n );\n}\n\nfunction firstArgument(node: Node & { arguments: unknown[] }): unknown {\n return node.arguments[0];\n}\n\nfunction isEffectMemberCallNamed(\n node: unknown,\n propertyName: string,\n): node is Node & { arguments: unknown[] } {\n if (!isEffectMemberCall(node)) {\n return false;\n }\n\n const callee = node.callee as Node;\n return isIdentifier((callee.property as Node | undefined), propertyName);\n}\n\nfunction hasDeepNestedEffectFirstArgument(node: unknown): node is Node & { arguments: unknown[] } {\n if (!isEffectMemberCall(node)) {\n return false;\n }\n\n const inner = firstArgument(node);\n if (!isEffectMemberCall(inner)) {\n return false;\n }\n\n return isEffectMemberCall(firstArgument(inner));\n}\n\nfunction hasNestedEffectCallArgument(node: unknown): node is Node & { arguments: unknown[] } {\n if (!isEffectMemberCall(node)) {\n return false;\n }\n\n return node.arguments.slice(0, 2).some((argument) => isEffectMemberCall(argument));\n}\n\nfunction containsEffectMemberCallNamed(node: unknown, propertyName: string): boolean {\n if (isEffectMemberCallNamed(node, propertyName)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsEffectMemberCallNamed(child, propertyName));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n return Object.values(node).some((child) => containsEffectMemberCallNamed(child, propertyName));\n}\n\nfunction getFlatMapLadderMessage(node: unknown): string | undefined {\n if (\n isEffectMemberCallNamed(node, \"flatMap\") &&\n containsEffectMemberCallNamed(node.arguments, \"flatMap\")\n ) {\n return \"Rule: avoid nested Effect.flatMap. Why: it hides sequencing and pushes laddered control flow. Fix: build context once (Effect.all/Effect.map) and run a single flatMap.\";\n }\n\n if (\n isEffectMemberCallNamed(node, \"flatten\") &&\n containsEffectMemberCallNamed(firstArgument(node), \"map\")\n ) {\n return \"Rule: avoid map+flatten ladders. Why: they hide sequencing. Fix: build context once (Effect.all/Effect.map) and run a single flatMap.\";\n }\n\n return undefined;\n}\n\nconst orElseSequencingCalls = [\"flatMap\", \"zipRight\", \"as\", \"tap\"] as const;\n\nfunction hasOrElseSequencingFirstArgument(node: unknown): node is Node & { arguments: unknown[] } {\n if (!isEffectMemberCallNamed(node, \"orElse\")) {\n return false;\n }\n\n const first = firstArgument(node);\n return orElseSequencingCalls.some((propertyName) => (\n containsEffectMemberCallNamed(first, propertyName)\n ));\n}\n\nfunction isPipeCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n if (call.type !== \"CallExpression\") {\n return false;\n }\n\n if (isIdentifier(call.callee, \"pipe\")) {\n return true;\n }\n\n const callee = call.callee;\n return (\n typeof callee === \"object\" &&\n callee !== null &&\n (callee as Node).type === \"MemberExpression\" &&\n (callee as Node).computed !== true &&\n isIdentifier((callee as Node).property, \"pipe\")\n );\n}\n\nfunction containsPipeCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isPipeCall(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsPipeCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsPipeCall(child, seen)\n ));\n}\n\nfunction isArrowIifeCall(node: unknown): node is Node & { callee: Node; arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n Array.isArray(call.arguments) &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"ArrowFunctionExpression\"\n );\n}\n\nfunction isInlineFunctionIifeCall(node: unknown): node is Node & { callee: Node; arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n Array.isArray(call.arguments) &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n ((call.callee as Node).type === \"ArrowFunctionExpression\" ||\n (call.callee as Node).type === \"FunctionExpression\")\n );\n}\n\nfunction findArrowIifeCall(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (isArrowIifeCall(node)) {\n return node;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findArrowIifeCall(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findArrowIifeCall(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction findReturnStatements(node: unknown, seen = new WeakSet<object>()): unknown[] {\n if (Array.isArray(node)) {\n return node.flatMap((child) => findReturnStatements(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return [];\n }\n\n if (seen.has(node)) {\n return [];\n }\n seen.add(node);\n\n if ((node as Node).type === \"ReturnStatement\") {\n return [node];\n }\n\n return Object.entries(node).flatMap(([key, child]) => (\n key === \"parent\" ? [] : findReturnStatements(child, seen)\n ));\n}\n\nfunction isSchemaFilterCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n (isMemberExpression(call.callee, \"S\", \"filter\") ||\n isMemberExpression(call.callee, \"Schema\", \"filter\"))\n );\n}\n\nfunction directArrowCallbackReturns(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null) {\n return [];\n }\n\n const call = node as Node;\n if (call.type !== \"CallExpression\" || !Array.isArray(call.arguments) || isSchemaFilterCall(call)) {\n return [];\n }\n\n return call.arguments.flatMap((argument) => {\n if (\n typeof argument !== \"object\" ||\n argument === null ||\n (argument as Node).type !== \"ArrowFunctionExpression\"\n ) {\n return [];\n }\n\n const body = (argument as Node).body;\n if (typeof body !== \"object\" || body === null || (body as Node).type !== \"BlockStatement\") {\n return [];\n }\n\n return findReturnStatements(body);\n });\n}\n\nfunction directFunctionCallbackReturns(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null) {\n return [];\n }\n\n const call = node as Node;\n if (call.type !== \"CallExpression\" || !Array.isArray(call.arguments)) {\n return [];\n }\n\n return call.arguments.flatMap((argument) => {\n if (\n typeof argument !== \"object\" ||\n argument === null ||\n (argument as Node).type !== \"FunctionExpression\" ||\n (argument as Node).generator === true\n ) {\n return [];\n }\n\n return findReturnStatements((argument as Node).body);\n });\n}\n\nfunction isGeneratorFunctionExpression(node: unknown): node is Node & { body: unknown } {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"FunctionExpression\" &&\n (node as Node).generator === true\n );\n}\n\nfunction getEffectGeneratorArgument(\n node: unknown,\n propertyName: \"fn\" | \"gen\",\n): (Node & { body: unknown }) | undefined {\n if (!isEffectMemberCallNamed(node, propertyName)) {\n return undefined;\n }\n\n const fn = firstArgument(node);\n return isGeneratorFunctionExpression(fn) ? fn : undefined;\n}\n\nfunction isEffectGeneratorCall(node: unknown, propertyName: \"fn\" | \"gen\"): boolean {\n return getEffectGeneratorArgument(node, propertyName) !== undefined;\n}\n\nfunction isConsoleCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"MemberExpression\" &&\n (call.callee as Node).computed !== true &&\n isIdentifier((call.callee as Node).object, \"console\") &&\n isIdentifier((call.callee as Node).property)\n );\n}\n\nfunction isIdentifierCall(node: unknown, name: string): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return call.type === \"CallExpression\" && isIdentifier(call.callee, name);\n}\n\nfunction isMemberCall(node: unknown, objectName: string, propertyName?: string): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"MemberExpression\" &&\n (call.callee as Node).computed !== true &&\n isIdentifier((call.callee as Node).object, objectName) &&\n isIdentifier((call.callee as Node).property) &&\n (propertyName === undefined || isIdentifier((call.callee as Node).property, propertyName))\n );\n}\n\nfunction isEffectLogCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n if (\n call.type !== \"CallExpression\" ||\n typeof call.callee !== \"object\" ||\n call.callee === null ||\n (call.callee as Node).type !== \"MemberExpression\" ||\n (call.callee as Node).computed === true ||\n !isIdentifier((call.callee as Node).object, \"Effect\") ||\n !isIdentifier((call.callee as Node).property)\n ) {\n return false;\n }\n\n return ((call.callee as Node).property as { name: string }).name.startsWith(\"log\");\n}\n\nfunction containsConsoleCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isConsoleCall(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsConsoleCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsConsoleCall(child, seen)\n ));\n}\n\nfunction containsWrapperSideEffect(node: unknown, seen = new WeakSet<object>()): boolean {\n if (\n isIdentifierCall(node, \"setState\") ||\n isMemberCall(node, \"Atom\", \"set\") ||\n isIdentifierCall(node, \"invalidate\") ||\n isEffectLogCall(node) ||\n isConsoleCall(node)\n ) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsWrapperSideEffect(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsWrapperSideEffect(child, seen)\n ));\n}\n\nfunction containsAllStepSideEffect(node: unknown, seen = new WeakSet<object>()): boolean {\n if (\n isMemberCall(node, \"Ref\", \"set\") ||\n isMemberCall(node, \"Atom\", \"set\") ||\n isMemberCall(node, \"SubscriptionRef\", \"set\") ||\n isMemberCall(node, \"Reactivity\", \"invalidate\") ||\n isMemberCall(node, \"Fiber\", \"interrupt\") ||\n isEffectLogCall(node)\n ) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsAllStepSideEffect(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsAllStepSideEffect(child, seen)\n ));\n}\n\nfunction hasConcurrencyOne(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const object = node as Node;\n if (object.type !== \"ObjectExpression\" || !Array.isArray(object.properties)) {\n return false;\n }\n\n return object.properties.some((entry) => {\n if (typeof entry !== \"object\" || entry === null) {\n return false;\n }\n\n const prop = entry as Node;\n const key = prop.key;\n const value = prop.value as Node | undefined;\n return (\n ((isIdentifier(key, \"concurrency\")) ||\n (typeof key === \"object\" && key !== null && (key as Node).value === \"concurrency\")) &&\n typeof value === \"object\" &&\n value !== null &&\n ((value.type === \"Literal\" || value.type === \"NumericLiteral\") && value.value === 1)\n );\n });\n}\n\nfunction isEffectAsVoidPipeArgument(node: unknown): boolean {\n return isMemberExpression(node, \"Effect\", \"asVoid\") || isMemberCall(node, \"Effect\", \"asVoid\");\n}\n\nfunction isEffectAllAsVoidPipe(node: unknown): node is Node & { callee: Node; arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n if (\n call.type !== \"CallExpression\" ||\n !Array.isArray(call.arguments) ||\n typeof call.callee !== \"object\" ||\n call.callee === null ||\n (call.callee as Node).type !== \"MemberExpression\" ||\n (call.callee as Node).computed === true ||\n !isIdentifier((call.callee as Node).property, \"pipe\")\n ) {\n return false;\n }\n\n return (\n isEffectMemberCallNamed((call.callee as Node).object, \"all\") &&\n call.arguments.some((argument) => isEffectAsVoidPipeArgument(argument))\n );\n}\n\nfunction pipeParts(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null || !isPipeCall(node)) {\n return [];\n }\n\n const call = node as Node & { arguments: unknown[] };\n if (isIdentifier(call.callee, \"pipe\")) {\n return call.arguments;\n }\n\n const callee = call.callee as Node;\n return [callee.object, ...call.arguments];\n}\n\nfunction isPipeStartingWithEffect(node: unknown): boolean {\n const [first] = pipeParts(node);\n return first !== undefined && containsAnyEffectMemberCall(first);\n}\n\nfunction isEffectWrapperAliasExpression(node: unknown): boolean {\n if (isPipeStartingWithEffect(node)) {\n return true;\n }\n\n if (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"ArrowFunctionExpression\"\n ) {\n const body = (node as Node).body;\n return isEffectMemberCall(body) || isPipeStartingWithEffect(body);\n }\n\n return false;\n}\n\nfunction hasEffectWrapperAliasReturn(node: unknown): boolean {\n return findReturnStatements(node).some((returnNode) => (\n typeof returnNode === \"object\" &&\n returnNode !== null &&\n (isEffectWrapperAliasExpression((returnNode as Node).argument) ||\n isEffectMemberCall((returnNode as Node).argument))\n ));\n}\n\nfunction isQualifiedTypeReference(node: unknown, leftName: string, rightName: string): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"TSTypeReference\") {\n return false;\n }\n\n const typeName = (node as Node).typeName;\n return (\n typeof typeName === \"object\" &&\n typeName !== null &&\n (typeName as Node).type === \"TSQualifiedName\" &&\n isIdentifier((typeName as Node).left, leftName) &&\n isIdentifier((typeName as Node).right, rightName)\n );\n}\n\nfunction containsQualifiedTypeReference(\n node: unknown,\n leftName: string,\n rightName: string,\n seen = new WeakSet<object>(),\n): boolean {\n if (isQualifiedTypeReference(node, leftName, rightName)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsQualifiedTypeReference(child, leftName, rightName, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsQualifiedTypeReference(child, leftName, rightName, seen)\n ));\n}\n\nfunction containsWrapGraphqlCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isIdentifierCall(node, \"wrapGraphqlCall\")) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsWrapGraphqlCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsWrapGraphqlCall(child, seen)\n ));\n}\n\nfunction isApplyResponseFlatMap(node: unknown): boolean {\n return (\n isEffectMemberCallNamed(node, \"flatMap\") &&\n isIdentifier(firstArgument(node), \"applyResponse\")\n );\n}\n\nfunction containsApplyResponseFlatMap(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isApplyResponseFlatMap(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsApplyResponseFlatMap(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsApplyResponseFlatMap(child, seen)\n ));\n}\n\nfunction findEffectCatchAll(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (isEffectMemberCallNamed(node, \"catchAll\")) {\n return node;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findEffectCatchAll(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findEffectCatchAll(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction getWrapGraphqlCatchAll(node: unknown): unknown | undefined {\n const parts = pipeParts(node);\n if (parts.length === 0) {\n return undefined;\n }\n\n const catchAll = findEffectCatchAll(parts);\n if (!catchAll) {\n return undefined;\n }\n\n return containsWrapGraphqlCall(parts) || containsApplyResponseFlatMap(parts)\n ? catchAll\n : undefined;\n}\n\nconst atomOperationMethods = new Set([\"get\", \"set\", \"update\", \"modify\", \"refresh\"]);\n\nfunction callbackBody(node: unknown): unknown | undefined {\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n const callback = node as Node;\n if (callback.type !== \"ArrowFunctionExpression\" && callback.type !== \"FunctionExpression\") {\n return undefined;\n }\n\n return callback.body;\n}\n\nfunction isAtomOperationCall(node: unknown): node is Node & { arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n if (\n call.type !== \"CallExpression\" ||\n !Array.isArray(call.arguments) ||\n typeof call.callee !== \"object\" ||\n call.callee === null ||\n (call.callee as Node).type !== \"MemberExpression\" ||\n (call.callee as Node).computed === true\n ) {\n return false;\n }\n\n const callee = call.callee as Node;\n return (\n (isIdentifier(callee.object, \"Atom\") || isIdentifier(callee.object, \"atomRegistry\")) &&\n isIdentifier(callee.property) &&\n atomOperationMethods.has((callee.property as { name: string }).name)\n );\n}\n\nfunction findAtomOperationCall(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (isAtomOperationCall(node)) {\n return node;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findAtomOperationCall(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findAtomOperationCall(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction findAtomOperationInsideEffectSync(node: unknown): unknown | undefined {\n if (!isEffectMemberCallNamed(node, \"sync\")) {\n return undefined;\n }\n\n const body = callbackBody(firstArgument(node));\n return body ? findAtomOperationCall(body) : undefined;\n}\n\nfunction isCollectionAtomIdentifier(node: unknown): boolean {\n if (!isIdentifier(node)) {\n return false;\n }\n\n return /(CollectionAtom|ListAtom|Visible.*Atom|ResultsAtom|ReadStateAtom)$/.test(node.name);\n}\n\nfunction getCollectionAtomReadTarget(node: unknown): unknown | undefined {\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n const call = node as Node;\n if (call.type !== \"CallExpression\" || !Array.isArray(call.arguments)) {\n return undefined;\n }\n\n const isFamilyRead =\n isIdentifier(call.callee, \"get\") ||\n isMemberExpression(call.callee, \"Atom\", \"get\") ||\n isMemberExpression(call.callee, \"get\", \"get\");\n\n if (!isFamilyRead) {\n return undefined;\n }\n\n const [atom] = call.arguments;\n return isCollectionAtomIdentifier(atom) ? atom : undefined;\n}\n\nfunction findFamilyCollectionRead(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n const target = getCollectionAtomReadTarget(node);\n if (target) {\n return target;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findFamilyCollectionRead(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findFamilyCollectionRead(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction isEffectProvideWithSingleArgument(node: unknown): boolean {\n return isEffectMemberCallNamed(node, \"provide\") && node.arguments.length === 1;\n}\n\nfunction findInlineRuntimeProvide(node: unknown): unknown | undefined {\n if (!isPipeCall(node)) {\n return undefined;\n }\n\n return pipeParts(node).find((part) => isEffectProvideWithSingleArgument(part));\n}\n\nfunction hasObjectSpread(node: unknown, seen = new WeakSet<object>()): boolean {\n if (typeof node === \"object\" && node !== null && (node as Node).type === \"SpreadElement\") {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => hasObjectSpread(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && hasObjectSpread(child, seen)\n ));\n}\n\nfunction isRefStateUpdateWithSpread(node: unknown): boolean {\n if (!isMemberCall(node, \"Ref\", \"update\") && !isMemberCall(node, \"Ref\", \"modify\")) {\n return false;\n }\n\n const callback = (node as Node & { arguments: unknown[] }).arguments[1];\n const body = callbackBody(callback);\n return hasObjectSpread(body);\n}\n\nfunction isEmptyObjectExpression(node: unknown): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"ObjectExpression\" &&\n Array.isArray((node as Node).properties) &&\n ((node as Node).properties as unknown[]).length === 0\n );\n}\n\nfunction containsObjectEntriesCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isMemberCall(node, \"Object\", \"entries\")) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsObjectEntriesCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsObjectEntriesCall(child, seen)\n ));\n}\n\nfunction isNakedObjectStateUpdate(node: unknown): boolean {\n if (isRefStateUpdateWithSpread(node)) {\n return true;\n }\n\n if (isMemberCall(node, \"Object\", \"assign\")) {\n const args = (node as Node & { arguments: unknown[] }).arguments;\n return args.length >= 3 && isEmptyObjectExpression(args[0]);\n }\n\n if (isMemberCall(node, \"Object\", \"fromEntries\")) {\n return containsObjectEntriesCall((node as Node & { arguments: unknown[] }).arguments[0]);\n }\n\n return isMemberCall(node, \"JSON\", \"stringify\") || isMemberCall(node, \"JSON\", \"parse\");\n}\n\nfunction isEffectSucceedVariableArgument(node: unknown): boolean {\n if (isIdentifier(node)) {\n return true;\n }\n\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"MemberExpression\"\n );\n}\n\nfunction isVariableAsAssertion(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"VariableDeclaration\") {\n return false;\n }\n\n return ((node as Node).declarations as unknown[] | undefined)?.some((declaration) => {\n if (typeof declaration !== \"object\" || declaration === null) {\n return false;\n }\n\n const init = (declaration as Node).init;\n return (\n typeof init === \"object\" &&\n init !== null &&\n (init as Node).type === \"TSAsExpression\" &&\n typeof (init as Node).typeAnnotation === \"object\" &&\n (init as Node).typeAnnotation !== null &&\n ((init as Node).typeAnnotation as Node).type !== \"TSConstKeyword\"\n );\n }) ?? false;\n}\n\nfunction isTypeofBooleanCheck(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"BinaryExpression\") {\n return false;\n }\n\n const binary = node as Node;\n if (binary.operator !== \"===\") {\n return false;\n }\n\n const left = binary.left;\n const right = binary.right;\n return (\n typeof left === \"object\" &&\n left !== null &&\n (left as Node).type === \"UnaryExpression\" &&\n (left as Node).operator === \"typeof\" &&\n typeof right === \"object\" &&\n right !== null &&\n ((right as Node).type === \"Literal\" || (right as Node).type === \"StringLiteral\") &&\n (right as Node).value === \"boolean\"\n );\n}\n\nfunction isMatchOrElseNullCall(node: unknown): boolean {\n return isMatchBranchCall(node, \"orElse\") && isNullLiteral(arrowCallbackBody(node.arguments[0]));\n}\n\nfunction isStringLiteral(node: unknown): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n ((node as Node).type === \"Literal\" || (node as Node).type === \"StringLiteral\") &&\n typeof (node as Node).value === \"string\"\n );\n}\n\nfunction isUndefinedIdentifier(node: unknown): boolean {\n return isIdentifier(node, \"undefined\");\n}\n\nfunction isNullishRewrap(node: unknown): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"LogicalExpression\" &&\n (node as Node).operator === \"??\" &&\n (isNullLiteral((node as Node).right) || isUndefinedIdentifier((node as Node).right))\n );\n}\n\nfunction isOptionFromNullableNullishCoalesce(node: unknown): boolean {\n return (\n isMemberCall(node, \"Option\", \"fromNullable\") &&\n isNullishRewrap((node as Node & { arguments: unknown[] }).arguments[0])\n );\n}\n\nfunction objectPropertyValue(node: unknown, keyName: string): unknown | undefined {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"ObjectExpression\") {\n return undefined;\n }\n\n for (const property of ((node as Node).properties as unknown[] | undefined) ?? []) {\n if (typeof property !== \"object\" || property === null) {\n continue;\n }\n\n const key = (property as Node).key;\n if (isIdentifier(key, keyName)) {\n return (property as Node).value;\n }\n }\n\n return undefined;\n}\n\nfunction isBooleanTrueComparison(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"BinaryExpression\") {\n return false;\n }\n\n const binary = node as Node;\n return (\n binary.operator === \"===\" &&\n (isBooleanLiteral(binary.left, true) || isBooleanLiteral(binary.right, true))\n );\n}\n\nfunction isOptionBooleanNormalization(node: unknown): boolean {\n if (!isMemberCall(node, \"Option\", \"match\")) {\n return false;\n }\n\n const config = (node as Node & { arguments: unknown[] }).arguments[1];\n const onSome = objectPropertyValue(config, \"onSome\");\n const onNone = objectPropertyValue(config, \"onNone\");\n return (\n isBooleanTrueComparison(arrowCallbackBody(onSome)) &&\n isBooleanLiteral(arrowCallbackBody(onNone), false)\n );\n}\n\nfunction isStringSentinelConst(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"VariableDeclaration\") {\n return false;\n }\n\n return ((node as Node).declarations as unknown[] | undefined)?.some((declaration) => (\n typeof declaration === \"object\" &&\n declaration !== null &&\n isStringLiteral((declaration as Node).init)\n )) ?? false;\n}\n\nfunction isBooleanLiteral(node: unknown, value: boolean): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n ((node as Node).type === \"Literal\" || (node as Node).type === \"BooleanLiteral\") &&\n (node as Node).value === value\n );\n}\n\nfunction isEffectVoidMember(node: unknown): boolean {\n return isMemberExpression(node, \"Effect\", \"void\");\n}\n\nfunction isMatchBranchCall(node: unknown, propertyName?: \"when\" | \"orElse\"): node is Node & { arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n Array.isArray(call.arguments) &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"MemberExpression\" &&\n (call.callee as Node).computed !== true &&\n isIdentifier((call.callee as Node).object, \"Match\") &&\n isIdentifier((call.callee as Node).property) &&\n (propertyName === undefined || isIdentifier((call.callee as Node).property, propertyName))\n );\n}\n\nfunction arrowCallbackBody(node: unknown): unknown | undefined {\n if (\n typeof node !== \"object\" ||\n node === null ||\n (node as Node).type !== \"ArrowFunctionExpression\"\n ) {\n return undefined;\n }\n\n return (node as Node).body;\n}\n\nfunction isVoidMatchBranch(node: unknown): boolean {\n if (!isMatchBranchCall(node)) {\n return false;\n }\n\n const [first, second] = node.arguments;\n if (isIdentifier((node.callee as Node).property, \"when\")) {\n return (\n (isBooleanLiteral(first, true) || isBooleanLiteral(first, false)) &&\n isEffectVoidMember(arrowCallbackBody(second))\n );\n }\n\n return (\n isIdentifier((node.callee as Node).property, \"orElse\") &&\n isEffectVoidMember(arrowCallbackBody(first))\n );\n}\n\nconst branchSequencingEffectCalls = [\"flatMap\", \"map\", \"andThen\", \"tap\", \"zipRight\"] as const;\n\nfunction isStreamMemberCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"MemberExpression\" &&\n (call.callee as Node).computed !== true &&\n isIdentifier((call.callee as Node).object, \"Stream\") &&\n isIdentifier((call.callee as Node).property)\n );\n}\n\nfunction containsAnyEffectMemberCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isEffectMemberCall(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsAnyEffectMemberCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsAnyEffectMemberCall(child, seen)\n ));\n}\n\nfunction containsBranchSequencingCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (\n branchSequencingEffectCalls.some((propertyName) => isEffectMemberCallNamed(node, propertyName)) ||\n isPipeCall(node) ||\n isStreamMemberCall(node)\n ) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsBranchSequencingCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsBranchSequencingCall(child, seen)\n ));\n}\n\nfunction isSequencingBranchBody(node: unknown): boolean {\n return containsAnyEffectMemberCall(node) && containsBranchSequencingCall(node);\n}\n\nfunction containsSequencingMatchBranch(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isMatchBranchCall(node)) {\n const body = isIdentifier((node.callee as Node).property, \"when\")\n ? arrowCallbackBody(node.arguments[1])\n : arrowCallbackBody(node.arguments[0]);\n\n if (isSequencingBranchBody(body)) {\n return true;\n }\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsSequencingMatchBranch(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsSequencingMatchBranch(child, seen)\n ));\n}\n\nfunction containsMatchBranchCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isMatchBranchCall(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsMatchBranchCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsMatchBranchCall(child, seen)\n ));\n}\n\nfunction isOptionMatchCall(node: unknown): node is Node & { arguments: unknown[] } {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"CallExpression\" &&\n Array.isArray((node as Node).arguments) &&\n isMemberExpression((node as Node).callee, \"Option\", \"match\")\n );\n}\n\nfunction isExpressionBodiedArrowCall(node: unknown): boolean {\n const body = arrowCallbackBody(node);\n return (\n typeof body === \"object\" &&\n body !== null &&\n (body as Node).type === \"CallExpression\"\n );\n}\n\nfunction findEffectGenCall(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (isEffectMemberCallNamed(node, \"gen\")) {\n return node;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findEffectGenCall(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findEffectGenCall(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction isMatchValuePipeCall(node: unknown): boolean {\n if (!isPipeCall(node) || typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n const callee = call.callee as Node;\n const object = callee.object;\n return (\n typeof object === \"object\" &&\n object !== null &&\n (object as Node).type === \"CallExpression\" &&\n isMemberExpression((object as Node).callee, \"Match\", \"value\")\n );\n}\n\nfunction isObjectBranchCall(node: unknown): boolean {\n return (\n isMatchValuePipeCall(node) ||\n (typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"CallExpression\" &&\n (isMemberExpression((node as Node).callee, \"Option\", \"match\") ||\n isMemberExpression((node as Node).callee, \"Either\", \"match\")))\n );\n}\n\nfunction containsObjectBranchCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isObjectBranchCall(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsObjectBranchCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsObjectBranchCall(child, seen)\n ));\n}\n\nfunction objectPropertyValues(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null) {\n return [];\n }\n\n const object = node as Node;\n if (object.type !== \"ObjectExpression\" || !Array.isArray(object.properties)) {\n return [];\n }\n\n return object.properties\n .map((property) => (\n typeof property === \"object\" && property !== null ? (property as Node).value : undefined\n ))\n .filter((value) => value !== undefined);\n}\n\nfunction report(context: OxlintContext, node: unknown, message: string) {\n context.report({ message, node: node as ESTree.Node });\n}\n\nfunction isNullLiteral(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const literal = node as Node;\n return (\n literal.type === \"NullLiteral\" ||\n (literal.type === \"Literal\" && literal.value === null)\n );\n}\n\nfunction getImportSource(node: unknown): string | undefined {\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n const source = (node as Node).source;\n if (typeof source === \"string\") {\n return source;\n }\n\n if (typeof source === \"object\" && source !== null) {\n const value = (source as Node).value;\n if (typeof value === \"string\") {\n return value;\n }\n }\n\n return undefined;\n}\n\nfunction isEffectEcosystemImport(source: string): boolean {\n return (\n source === \"effect\" ||\n source.startsWith(\"effect/\") ||\n source === \"@effect-atom/atom-react\"\n );\n}\n\nfunction createEffectGatedStatementRule(\n visitorName: \"IfStatement\" | \"SwitchStatement\" | \"ConditionalExpression\",\n message: string,\n) {\n return defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n [visitorName](node: any) {\n if (hasEffectEcosystemImport) {\n report(context, node, message);\n }\n },\n };\n },\n });\n}\n\nconst reactStateHooks = new Set([\n \"useState\",\n \"useReducer\",\n \"useContext\",\n \"useCallback\",\n \"useEffect\",\n \"useSyncExternalStore\",\n]);\n\nconst noReactState = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n const callee = node.callee;\n const hookName = isIdentifier(callee)\n ? callee.name\n : typeof callee === \"object\" &&\n callee !== null &&\n (callee as Node).type === \"MemberExpression\" &&\n isIdentifier((callee as Node).property)\n ? ((callee as Node).property as { name: string }).name\n : undefined;\n\n if (hookName && reactStateHooks.has(hookName)) {\n report(\n context,\n callee,\n \"Rule: avoid React state hooks. Why: they bypass the atom runtime and break reactive flow. Fix: use @effect-atom/atom-react instead.\",\n );\n }\n },\n };\n },\n});\n\nconst noIfStatement = createEffectGatedStatementRule(\n \"IfStatement\",\n \"Rule: avoid imperative if branching. Why: Effect code should keep branching explicit and typed. Fix: use Match.value/Match.type or Effect combinators instead.\",\n);\n\nconst noSwitchStatement = createEffectGatedStatementRule(\n \"SwitchStatement\",\n \"Rule: avoid imperative switch branching. Why: Effect code should keep branching explicit and typed. Fix: use Match.value/Match.type instead.\",\n);\n\nconst noTernary = createEffectGatedStatementRule(\n \"ConditionalExpression\",\n \"Rule: avoid ternary expressions. Why: they hide control flow inside expressions. Fix: use Option.match/Either.match/Match.value or data combinators, then run one Effect pipeline.\",\n);\n\nconst noReturnNull = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n ReturnStatement(node: any) {\n if (hasEffectEcosystemImport && isNullLiteral(node.argument)) {\n report(\n context,\n node,\n \"Rule: avoid returning null. Why: null is a sentinel that forces defensive guards. Fix: use Option.none for absence or Effect.fail for errors.\",\n );\n }\n },\n };\n },\n});\n\nconst noOptionAs = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isMemberExpression(node.callee, \"Option\", \"as\")) {\n report(\n context,\n node,\n \"Rule: avoid Option.as. Why: it hides selection and encourages placeholder flows. Fix: use Option.map or Option.match and return the value explicitly.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectNever = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n MemberExpression(node: any) {\n if (hasEffectEcosystemImport && isMemberExpression(node, \"Effect\", \"never\")) {\n report(\n context,\n node,\n \"Rule: avoid Effect.never. Why: it hides lifecycle and leaks resources. Fix: use Stream or explicit acquire/release lifecycles with clear teardown.\",\n );\n }\n },\n };\n },\n});\n\nconst noArrowLadder = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport || !isArrowIifeCall(node)) {\n return;\n }\n\n const nested = findArrowIifeCall(node.callee.body);\n if (nested) {\n report(\n context,\n nested,\n \"Rule: avoid nested IIFEs. Why: they hide sequencing and push wrapper hacks. Fix: bind a named context with const and keep one flat pipeline with a single Match/Option decision.\",\n );\n }\n },\n };\n },\n});\n\nconst noBranchInObject = defineRule({\n create(context: OxlintContext) {\n return {\n ObjectExpression(node: any) {\n if (objectPropertyValues(node).some((value) => containsObjectBranchCall(value))) {\n report(\n context,\n node,\n \"Rule: avoid Match/Option/Either inside object literals. Why: it hides the decision and invites workaround scaffolding. Fix: compute the value first (context), then build the object from named values with one flat decision.\",\n );\n }\n },\n };\n },\n});\n\nconst noIifeWrapper = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isInlineFunctionIifeCall(node)) {\n report(\n context,\n node,\n \"Rule: avoid immediate invocation of inline functions. Why: it hides decisions and sequencing. Fix: bind a named context with const and keep one Match/Option decision in a flat pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst noReturnInArrow = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n for (const returnNode of directArrowCallbackReturns(node)) {\n report(\n context,\n returnNode,\n \"Rule: avoid block-bodied arrow callbacks with returns. Why: they hide local control flow. Fix: use expression-only callbacks and move the logic into a single pipeline (pipe/Match/Option/A.map).\",\n );\n }\n },\n };\n },\n});\n\nconst noReturnInCallback = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n for (const returnNode of directFunctionCallbackReturns(node)) {\n report(\n context,\n returnNode,\n \"Rule: avoid returns inside inline callbacks. Why: they hide control flow. Prefer expression-only callbacks, but leaf-level Effect branches with local bindings may use returns when needed.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectFnGenerator = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isEffectGeneratorCall(node, \"fn\")) {\n report(\n context,\n node,\n \"Rule: avoid Effect.fn generator wrappers. Why: they hide sequencing and dodge ladder rules. Fix: keep a single flat pipeline or use one Effect.gen.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectSyncConsole = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (\n hasEffectEcosystemImport &&\n isEffectMemberCallNamed(node, \"sync\") &&\n containsConsoleCall(firstArgument(node))\n ) {\n report(\n context,\n node,\n \"Rule: avoid console.* inside Effect.sync. Why: it hides side effects. Fix: replace with Effect.log* or remove the console call.\",\n );\n }\n },\n };\n },\n});\n\nconst noNestedEffectGen = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n const generator = getEffectGeneratorArgument(node, \"gen\");\n if (!hasEffectEcosystemImport || !generator) {\n return;\n }\n\n const nested = findEffectGenCall(generator.body);\n if (nested) {\n report(\n context,\n nested,\n \"Rule: avoid nested Effect.gen. Why: nested generators hide sequencing. Fix: flatten to a single Effect.gen per method or a single flat pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst noMatchVoidBranch = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isVoidMatchBranch(node)) {\n report(\n context,\n node,\n \"Rule: avoid void Match branches. Why: they hide guard-style control flow. Fix: remove the no-op branch or select a value and run one Effect pipeline outside the Match.\",\n );\n }\n },\n };\n },\n});\n\nconst noMatchEffectBranch = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isMatchValuePipeCall(node) && containsSequencingMatchBranch(node.arguments)) {\n report(\n context,\n node,\n \"Rule: avoid multi-step sequencing inside Match branches. Why: it hides control flow. Fix: select a value in Match, then run one Effect pipeline outside. Avoid data-encoded conditionals (Option.toArray/forEach) that only rewrap the branch.\",\n );\n }\n\n if (isOptionMatchCall(node) && isSequencingBranchBody(node.arguments)) {\n report(\n context,\n node,\n \"Rule: avoid multi-step sequencing inside Option.match branches. Why: it hides control flow. Prefer selecting a value in Option.match, then run one Effect pipeline outside. Leaf-level flows with local bindings may keep Option.match but should stay linear.\",\n );\n }\n },\n };\n },\n});\n\nconst warnEffectSyncWrapper = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n const callback = firstArgument(node);\n const body = arrowCallbackBody(callback);\n if (\n hasEffectEcosystemImport &&\n isEffectMemberCallNamed(node, \"sync\") &&\n isExpressionBodiedArrowCall(callback) &&\n !isConsoleCall(body)\n ) {\n report(\n context,\n node,\n \"Rule: avoid Effect.sync around side effects. Why: it hides intent. Fix: use Effect.log* or an explicit pipeline step for the side effect.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectSideEffectWrapper = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isEffectMemberCallNamed(node, \"as\") && containsWrapperSideEffect(firstArgument(node))) {\n report(\n context,\n node,\n \"Rule: avoid Effect.as for side effects. Why: it hides side effects and turns them into placeholders. Fix: use explicit pipeline steps that return real values with Effect.flatMap, Effect.andThen, or Effect.tap.\",\n );\n }\n\n if (\n isEffectMemberCallNamed(node, \"zipRight\") &&\n containsWrapperSideEffect(firstArgument(node))\n ) {\n report(\n context,\n node,\n \"Rule: avoid Effect.zipRight for side effects. Why: it hides side effects and discards values. Fix: use explicit pipeline steps that return real values with Effect.flatMap, Effect.andThen, or Effect.tap.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectAllStepSequencing = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (\n isEffectMemberCallNamed(node, \"all\") &&\n containsAllStepSideEffect(node.arguments[0]) &&\n hasConcurrencyOne(node.arguments[1])\n ) {\n report(\n context,\n node,\n \"Rule: avoid Effect.all for sequential side-effect steps. Why: it hides imperative sequencing in an array. Fix: use one explicit linear pipeline with Effect.andThen/flatMap and reserve Effect.all for real value aggregation.\",\n );\n }\n\n if (\n isEffectAllAsVoidPipe(node) &&\n containsAllStepSideEffect(firstArgument((node.callee as Node).object as Node & {\n arguments: unknown[];\n }))\n ) {\n report(\n context,\n node,\n \"Rule: avoid Effect.all for sequential side-effect steps. Why: it hides imperative sequencing in an array. Fix: use one explicit linear pipeline with Effect.andThen/flatMap and reserve Effect.all for real value aggregation.\",\n );\n }\n },\n };\n },\n});\n\nconst noTryCatch = defineRule({\n create(context: OxlintContext) {\n return {\n TryStatement(node: any) {\n report(\n context,\n node,\n \"Rule: avoid try/catch in Effect files. Why: it bypasses Effect error channels and reintroduces imperative control flow. Fix: model failures in Effect and handle them with typed errors and Effect combinators.\",\n );\n },\n };\n },\n});\n\nconst noEffectWrapperAlias = defineRule({\n create(context: OxlintContext) {\n return {\n VariableDeclaration(node: any) {\n for (const declaration of node.declarations ?? []) {\n if (isEffectWrapperAliasExpression(declaration.init)) {\n report(\n context,\n node,\n \"Rule: avoid Effect wrapper aliases (`const x = ...Effect...`). Why: it creates wrapper choreography and bloats consts. Fix: inline the pipeline at the call site or define a real domain function that returns data, not an Effect wrapper.\",\n );\n }\n }\n },\n FunctionDeclaration(node: any) {\n if (hasEffectWrapperAliasReturn(node.body)) {\n report(\n context,\n node,\n \"Rule: avoid Effect wrapper aliases (`function x(...) { return Effect... }`). Why: it creates wrapper choreography and bloats consts. Fix: inline the pipeline at the call site or define a real domain function that returns data, not an Effect wrapper.\",\n );\n }\n },\n };\n },\n});\n\nconst noManualEffectChannels = defineRule({\n create(context: OxlintContext) {\n return {\n TSTypeReference(node: any) {\n if (\n isQualifiedTypeReference(node, \"Effect\", \"Effect\") ||\n isQualifiedTypeReference(node, \"Layer\", \"Layer\")\n ) {\n report(\n context,\n node,\n \"Rule: avoid manual Effect channel tuples (`Effect.Effect<...>` / `Layer.Layer<...>`). Why: channels compose through the Effect pipeline and services; hand-written tuples desync from the real flow. Fix: drop the generic and let the return type infer from the Effect/Layer you return, or expose a service method that returns the effect directly.\",\n );\n }\n },\n };\n },\n});\n\nconst noWrapgraphqlCatchall = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n const catchAll = hasEffectEcosystemImport ? getWrapGraphqlCatchAll(node) : undefined;\n if (catchAll) {\n report(\n context,\n catchAll,\n \"Rule: avoid catchAll after wrapGraphqlCall/applyResponse. Why: the envelope already surfaces structured errors. Fix: handle errors in the response mapping instead of catchAll.\",\n );\n }\n },\n };\n },\n});\n\nconst noRenderSideEffects = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n ExpressionStatement(node: any) {\n if (\n hasEffectEcosystemImport &&\n isMatchValuePipeCall(node.expression) &&\n containsMatchBranchCall((node.expression as Node).arguments)\n ) {\n report(\n context,\n node.expression,\n \"Rule: avoid Match.value(...).pipe(...) as a statement. Why: it runs side effects during render. Fix: move the side effect into an Effect runtime action or event handler, and keep Match as a pure expression.\",\n );\n }\n },\n };\n },\n});\n\nconst noAtomRegistryEffectSync = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n const atomOperation = hasEffectEcosystemImport\n ? findAtomOperationInsideEffectSync(node)\n : undefined;\n if (atomOperation) {\n report(\n context,\n atomOperation,\n \"Rule: do not wrap Atom/atomRegistry ops in Effect.sync. Why: it hides side effects and breaks atom flow. Fix: call Atom.get/Atom.set/Atom.update/Atom.modify/Atom.refresh directly.\",\n );\n }\n },\n };\n },\n});\n\nconst noFamilyCollectionRead = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (!isMemberCall(node, \"Atom\", \"family\")) {\n return;\n }\n\n const collectionAtom = findFamilyCollectionRead(node.arguments);\n if (collectionAtom) {\n report(\n context,\n collectionAtom,\n \"Keyed projection atom reads collection atom. Why: Atom.family should project from keyed/source atoms, not broad collection state. Fix: pass the keyed atom into the family or create a keyed source atom before reading.\",\n );\n }\n },\n };\n },\n});\n\nconst noInlineRuntimeProvide = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n const provide = hasEffectEcosystemImport ? findInlineRuntimeProvide(node) : undefined;\n if (provide) {\n report(\n context,\n provide,\n \"Rule: do not inline runtime provisioning inside local helper Effect code. Why: `yield* SomeRuntime.pipe(Effect.provide(SomeRuntimeLive))` and equivalent inline provide chains hide dependency assembly instead of owning it at an Effect.Service boundary or one exported Effect boundary. Fix: declare the live dependency on the owning service or provide it once at the exported boundary, then `yield*` the runtime or service directly inside the body.\",\n );\n }\n },\n };\n },\n});\n\nconst noNakedObjectStateUpdate = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isNakedObjectStateUpdate(node)) {\n report(\n context,\n node,\n \"Rule: avoid naked JS state patching/rebuild and raw JSON shortcuts in Effect transitions. Why: spread/Object.assign/fromEntries and inline JSON parse/stringify hide state intent and bypass explicit model contracts. Fix: use `effect/Record` combinators (`Record.set` / `Record.modify` / `Record.remove`) inside `Struct.evolve`, rebuild with schema constructors (`Schema.make` or field `.make`), and keep serialization at boundaries with schema encode/decode flows. Use `linting.md` guidance when available.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectSucceedVariable = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (\n hasEffectEcosystemImport &&\n isEffectMemberCallNamed(node, \"succeed\") &&\n isEffectSucceedVariableArgument(firstArgument(node))\n ) {\n report(\n context,\n node,\n \"Rule: avoid Effect.succeed(variable) as a branch placeholder. Why: it hides a decision and turns data into pseudo-control flow. Fix: select a plain value (Option/Match) and then run one Effect pipeline after the decision; if you already read the state, return it as a value. Avoid Option.toArray/forEach hacks that just re-encode the branch.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectTypeAlias = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n TSTypeAliasDeclaration(node: any) {\n if (\n hasEffectEcosystemImport &&\n containsQualifiedTypeReference(node.typeAnnotation, \"Effect\", \"Effect\")\n ) {\n report(\n context,\n node.typeAnnotation,\n \"Rule: avoid Effect.Effect type aliases. Why: they hide the service surface and make types opaque. Fix: keep Effect types on service methods or inline at the call site.\",\n );\n }\n },\n };\n },\n});\n\nconst noModelOverlayCast = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n VariableDeclaration(node: any) {\n if (hasEffectEcosystemImport && isVariableAsAssertion(node)) {\n report(\n context,\n node,\n \"Rule: avoid `as` assertions on decoded model flow. Why: assertions hide schema drift and allow untyped overlays. Fix: decode with the correct schema type and read fields directly.\",\n );\n }\n },\n };\n },\n});\n\nconst noUnknownBooleanCoercionHelper = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n let hasMatchOrElseNull = false;\n const booleanChecks: unknown[] = [];\n const reported = new WeakSet<object>();\n\n const reportBooleanCheck = (node: unknown) => {\n if (typeof node !== \"object\" || node === null || reported.has(node)) {\n return;\n }\n\n reported.add(node);\n report(\n context,\n node,\n \"Rule: avoid local unknown-to-boolean coercion helpers in services. Why: runtime coercion belongs at schema boundary, not in service flow. Fix: decode boolean optionality in schema and read typed booleans in the Effect pipeline.\",\n );\n };\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n BinaryExpression(node: any) {\n if (!hasEffectEcosystemImport || !isTypeofBooleanCheck(node)) {\n return;\n }\n\n if (hasMatchOrElseNull) {\n reportBooleanCheck(node);\n } else {\n booleanChecks.push(node);\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport || !isMatchOrElseNullCall(node)) {\n return;\n }\n\n hasMatchOrElseNull = true;\n for (const check of booleanChecks) {\n reportBooleanCheck(check);\n }\n },\n };\n },\n});\n\nconst noFromnullableNullishCoalesce = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isOptionFromNullableNullishCoalesce(node)) {\n report(\n context,\n node,\n \"Rule: avoid nullish re-wrap inside Option.fromNullable. Why: `x ?? null` and `x ?? undefined` add noise and hide source shape. Fix: pass the source directly to Option.fromNullable.\",\n );\n }\n },\n };\n },\n});\n\nconst noOptionBooleanNormalization = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isOptionBooleanNormalization(node)) {\n report(\n context,\n node,\n \"Rule: avoid repeated Option boolean normalization (`onSome: value === true, onNone: false`). Why: it scatters coercion rules across services. Fix: normalize once at schema boundary and read booleans directly.\",\n );\n }\n },\n };\n },\n});\n\nconst noStringSentinelReturn = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isEffectMemberCallNamed(node, \"succeed\") && isStringLiteral(firstArgument(node))) {\n report(\n context,\n node,\n \"Rule: avoid returning string tokens. Why: it encodes control flow and forces defensive branching. Fix: return domain values (Option/Either/tagged unions) or real Effect results instead.\",\n );\n }\n },\n };\n },\n});\n\nconst noStringSentinelConst = defineRule({\n create(context: OxlintContext) {\n return {\n VariableDeclaration(node: any) {\n if (isStringSentinelConst(node)) {\n report(\n context,\n node,\n \"Rule: avoid string status constants. Why: they encode control flow and force defensive branching. Fix: use tagged unions, Option/Either, or meaningful domain values instead of string tokens.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectAs = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isMemberExpression(node.callee, \"Effect\", \"as\")) {\n report(\n context,\n node.callee,\n \"Rule: avoid Effect.as wrappers. Why: they can hide meaningful sequencing or value flow. Fix: return the intended value directly or use explicit Effect.map/andThen.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectDo = defineRule({\n create(context: OxlintContext) {\n return {\n MemberExpression(node: any) {\n if (isMemberExpression(node, \"Effect\", \"Do\")) {\n report(\n context,\n node,\n \"Rule: avoid Effect.Do. Why: it hides sequencing behind builder state. Fix: use Effect.gen or a direct pipe.\",\n );\n }\n },\n };\n },\n});\n\nfunction createForbiddenMemberCallRule(objectName: string, propertyName: string, message: string) {\n return defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isMemberExpression(node.callee, objectName, propertyName)) {\n report(context, node.callee, message);\n }\n },\n };\n },\n });\n}\n\nconst noEffectBind = createForbiddenMemberCallRule(\n \"Effect\",\n \"bind\",\n \"Rule: avoid Effect.bind. Why: it obscures linear data flow behind builder-style binding. Fix: use Effect.gen or a direct pipe with flatMap/map.\",\n);\n\nconst noRuntimeRunFork = createForbiddenMemberCallRule(\n \"Runtime\",\n \"runFork\",\n \"Rule: avoid Runtime.runFork. Why: detached fibers hide lifetime and interruption ownership. Fix: run effects through the application runtime boundary.\",\n);\n\nconst noEffectAsync = createForbiddenMemberCallRule(\n \"Effect\",\n \"async\",\n \"Rule: avoid Effect.async. Why: manual callback bridges are easy to leak or resume incorrectly. Fix: use scoped Effect APIs or a dedicated platform adapter.\",\n);\n\nconst noNestedEffectCall = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (hasDeepNestedEffectFirstArgument(node)) {\n report(\n context,\n node,\n \"Rule: avoid deeply nested Effect calls (Effect.xx(Effect.yy(Effect.zz(...)))). Why: they hide sequencing and spread flow. Fix: build values first, then run one flat Effect pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectLadder = defineRule({\n create(context: OxlintContext) {\n return {\n VariableDeclaration(node: any) {\n for (const declaration of node.declarations ?? []) {\n if (hasDeepNestedEffectFirstArgument(declaration.init)) {\n report(\n context,\n declaration.init,\n \"Rule: avoid nested Effect combinators. Why: they hide sequencing and create laddered control flow. Fix: build context once (Effect.all/Effect.map) and then run a single flat pipeline.\",\n );\n }\n }\n },\n ReturnStatement(node: any) {\n if (hasDeepNestedEffectFirstArgument(node.argument)) {\n report(\n context,\n node.argument,\n \"Rule: avoid nested Effect combinators. Why: they hide sequencing and create laddered control flow. Fix: build context once (Effect.all/Effect.map) and then run a single flat pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst noFlatMapLadder = defineRule({\n create(context: OxlintContext) {\n return {\n VariableDeclaration(node: any) {\n for (const declaration of node.declarations ?? []) {\n const message = getFlatMapLadderMessage(declaration.init);\n if (message) {\n report(context, declaration.init, message);\n }\n }\n },\n ReturnStatement(node: any) {\n const message = getFlatMapLadderMessage(node.argument);\n if (message) {\n report(context, node.argument, message);\n }\n },\n };\n },\n});\n\nconst noPipeLadder = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isPipeCall(node) && containsPipeCall(node.arguments)) {\n report(\n context,\n node,\n \"Rule: avoid nested pipe() chains. Why: they hide sequencing. Fix: refactor into one flat pipeline with a single decision point.\",\n );\n }\n },\n };\n },\n});\n\nconst noCallTower = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (hasNestedEffectCallArgument(node)) {\n report(\n context,\n node,\n \"Rule: avoid nested Effect call towers (Effect.fn(Effect.fn(...))). Why: it hides sequencing. Fix: build the inner Effect first, then use pipe/Effect.flatMap/Effect.andThen for a single flat pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectOrElseLadder = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (hasOrElseSequencingFirstArgument(node)) {\n report(\n context,\n node,\n \"Rule: avoid Effect.orElse around sequencing chains. Why: it hides error handling and splits the flow. Fix: move error handling to a single terminal decision after the pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst preventDynamicImports = defineRule({\n create(context: OxlintContext) {\n return {\n ImportExpression(node: any) {\n report(\n context,\n node,\n \"Rule: avoid dynamic imports. Why: runtime module loading obscures dependency boundaries. Fix: use static imports.\",\n );\n },\n };\n },\n});\n\nconst rules = {\n \"no-react-state\": noReactState,\n \"no-if-statement\": noIfStatement,\n \"no-switch-statement\": noSwitchStatement,\n \"no-ternary\": noTernary,\n \"no-return-null\": noReturnNull,\n \"no-option-as\": noOptionAs,\n \"no-effect-never\": noEffectNever,\n \"no-arrow-ladder\": noArrowLadder,\n \"no-branch-in-object\": noBranchInObject,\n \"no-iife-wrapper\": noIifeWrapper,\n \"no-return-in-arrow\": noReturnInArrow,\n \"no-return-in-callback\": noReturnInCallback,\n \"no-effect-fn-generator\": noEffectFnGenerator,\n \"no-effect-sync-console\": noEffectSyncConsole,\n \"no-nested-effect-gen\": noNestedEffectGen,\n \"no-match-void-branch\": noMatchVoidBranch,\n \"no-match-effect-branch\": noMatchEffectBranch,\n \"warn-effect-sync-wrapper\": warnEffectSyncWrapper,\n \"no-effect-side-effect-wrapper\": noEffectSideEffectWrapper,\n \"no-effect-all-step-sequencing\": noEffectAllStepSequencing,\n \"no-try-catch\": noTryCatch,\n \"no-effect-wrapper-alias\": noEffectWrapperAlias,\n \"no-manual-effect-channels\": noManualEffectChannels,\n \"no-wrapgraphql-catchall\": noWrapgraphqlCatchall,\n \"no-render-side-effects\": noRenderSideEffects,\n \"no-atom-registry-effect-sync\": noAtomRegistryEffectSync,\n \"no-family-collection-read\": noFamilyCollectionRead,\n \"no-inline-runtime-provide\": noInlineRuntimeProvide,\n \"no-naked-object-state-update\": noNakedObjectStateUpdate,\n \"no-effect-succeed-variable\": noEffectSucceedVariable,\n \"no-effect-type-alias\": noEffectTypeAlias,\n \"no-model-overlay-cast\": noModelOverlayCast,\n \"no-unknown-boolean-coercion-helper\": noUnknownBooleanCoercionHelper,\n \"no-fromnullable-nullish-coalesce\": noFromnullableNullishCoalesce,\n \"no-option-boolean-normalization\": noOptionBooleanNormalization,\n \"no-string-sentinel-return\": noStringSentinelReturn,\n \"no-string-sentinel-const\": noStringSentinelConst,\n \"no-effect-as\": noEffectAs,\n \"no-effect-do\": noEffectDo,\n \"no-effect-bind\": noEffectBind,\n \"no-runtime-runfork\": noRuntimeRunFork,\n \"no-effect-async\": noEffectAsync,\n \"prevent-dynamic-imports\": preventDynamicImports,\n \"no-nested-effect-call\": noNestedEffectCall,\n \"no-effect-ladder\": noEffectLadder,\n \"no-flatmap-ladder\": noFlatMapLadder,\n \"no-pipe-ladder\": noPipeLadder,\n \"no-call-tower\": noCallTower,\n \"no-effect-orElse-ladder\": noEffectOrElseLadder,\n};\n\nexport const allRules = Object.fromEntries(\n Object.keys(rules).map((ruleName) => [`linteffect/${ruleName}`, \"error\"]),\n) as Record<`linteffect/${string}`, \"error\">;\n\nexport const recommended = {\n jsPlugins: [\n {\n name: \"linteffect\",\n specifier: \"@opsydyn/oxlint-effect\",\n },\n ],\n rules: allRules,\n} as const;\n\nexport default definePlugin({\n meta: {\n name: \"linteffect\",\n },\n rules,\n});\n"],"mappings":";;AAQA,SAAS,aAAa,MAAe,MAAgD;CACnF,OACE,OAAO,SAAS,YAChB,SAAS,QACR,KAAc,SAAS,gBACxB,OAAQ,KAAc,SAAS,aAC9B,SAAS,KAAA,KAAc,KAAc,SAAS;AAEnD;AAEA,SAAS,mBAAmB,MAAe,YAAoB,cAA+B;CAC5F,IAAI,OAAO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gBAAgB;CAChB,mBAAmB;CACnB,mBAAmB;CACnB,uBAAuB;CACvB,mBAAmB;CACnB,sBAAsB;CACtB,yBAAyB;CACzB,0BAA0B;CAC1B,0BAA0B;CAC1B,wBAAwB;CACxB,wBAAwB;CACxB,0BAA0B;CAC1B,4BAA4B;CAC5B,iCAAiC;CACjC,iCAAiC;CACjC,gBAAgB;CAChB,2BAA2B;CAC3B,6BAA6B;CAC7B,2BAA2B;CAC3B,0BAA0B;CAC1B,gCAAgC;CAChC,6BAA6B;CAC7B,6BAA6B;CAC7B,gCAAgC;CAChC,8BAA8B;CAC9B,wBAAwB;CACxB,yBAAyB;CACzB,sCAAsC;CACtC,oCAAoC;CACpC,mCAAmC;CACnC,6BAA6B;CAC7B,4BAA4B;CAC5B,gBAAgB;CAChB,gBAAgB;CAChB,kBAAkB;CAClB,sBAAsB;CACtB,mBAAmB;CACnB,2BAzD4B,WAAW,EACvC,OAAO,SAAwB;EAC7B,OAAO,EACL,iBAAiB,MAAW;GAC1B,OACE,SACA,MACA,mHACF;EACF,EACF;CACF,EACF,CA6CiD;CAC/C,yBAAyB;CACzB,oBAAoB;CACpB,qBAAqB;CACrB,kBAAkB;CAClB,iBAAiB;CACjB,2BAA2B;AAC7B;AAEA,MAAa,WAAW,OAAO,YAC7B,OAAO,KAAK,KAAK,CAAC,CAAC,KAAK,aAAa,CAAC,cAAc,YAAY,OAAO,CAAC,CAC1E;AAEA,MAAa,cAAc;CACzB,WAAW,CACT;EACE,MAAM;EACN,WAAW;CACb,CACF;CACA,OAAO;AACT;AAEA,IAAA,cAAe,aAAa;CAC1B,MAAM,EACJ,MAAM,aACR;CACA;AACF,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":["call"],"sources":["../src/index.ts"],"sourcesContent":["import { definePlugin, defineRule } from \"@oxlint/plugins\";\nimport type { Context as OxlintContext, ESTree } from \"@oxlint/plugins\";\n\ntype Node = {\n type?: string;\n [key: string]: unknown;\n};\n\nfunction isIdentifier(node: unknown, name?: string): node is Node & { name: string } {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"Identifier\" &&\n typeof (node as Node).name === \"string\" &&\n (name === undefined || (node as Node).name === name)\n );\n}\n\nfunction isMemberExpression(node: unknown, objectName: string, propertyName: string): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const member = node as Node;\n return (\n member.type === \"MemberExpression\" &&\n member.computed !== true &&\n isIdentifier(member.object, objectName) &&\n isIdentifier(member.property, propertyName)\n );\n}\n\nfunction isEffectMemberCall(node: unknown): node is Node & { arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n Array.isArray(call.arguments) &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"MemberExpression\" &&\n (call.callee as Node).computed !== true &&\n isIdentifier((call.callee as Node).object, \"Effect\") &&\n isIdentifier((call.callee as Node).property)\n );\n}\n\nfunction firstArgument(node: Node & { arguments: unknown[] }): unknown {\n return node.arguments[0];\n}\n\nfunction isEffectMemberCallNamed(\n node: unknown,\n propertyName: string,\n): node is Node & { arguments: unknown[] } {\n if (!isEffectMemberCall(node)) {\n return false;\n }\n\n const callee = node.callee as Node;\n return isIdentifier((callee.property as Node | undefined), propertyName);\n}\n\nfunction hasDeepNestedEffectFirstArgument(node: unknown): node is Node & { arguments: unknown[] } {\n if (!isEffectMemberCall(node)) {\n return false;\n }\n\n const inner = firstArgument(node);\n if (!isEffectMemberCall(inner)) {\n return false;\n }\n\n return isEffectMemberCall(firstArgument(inner));\n}\n\nfunction hasNestedEffectCallArgument(node: unknown): node is Node & { arguments: unknown[] } {\n if (!isEffectMemberCall(node)) {\n return false;\n }\n\n return node.arguments.slice(0, 2).some((argument) => isEffectMemberCall(argument));\n}\n\nfunction containsEffectMemberCallNamed(node: unknown, propertyName: string): boolean {\n if (isEffectMemberCallNamed(node, propertyName)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsEffectMemberCallNamed(child, propertyName));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n return Object.values(node).some((child) => containsEffectMemberCallNamed(child, propertyName));\n}\n\nfunction getFlatMapLadderMessage(node: unknown): string | undefined {\n if (\n isEffectMemberCallNamed(node, \"flatMap\") &&\n containsEffectMemberCallNamed(node.arguments, \"flatMap\")\n ) {\n return \"Rule: avoid nested Effect.flatMap. Why: it hides sequencing and pushes laddered control flow. Fix: build context once (Effect.all/Effect.map) and run a single flatMap.\";\n }\n\n if (\n isEffectMemberCallNamed(node, \"flatten\") &&\n containsEffectMemberCallNamed(firstArgument(node), \"map\")\n ) {\n return \"Rule: avoid map+flatten ladders. Why: they hide sequencing. Fix: build context once (Effect.all/Effect.map) and run a single flatMap.\";\n }\n\n return undefined;\n}\n\nconst orElseSequencingCalls = [\"flatMap\", \"zipRight\", \"as\", \"tap\"] as const;\n\nfunction hasOrElseSequencingFirstArgument(node: unknown): node is Node & { arguments: unknown[] } {\n if (!isEffectMemberCallNamed(node, \"orElse\")) {\n return false;\n }\n\n const first = firstArgument(node);\n return orElseSequencingCalls.some((propertyName) => (\n containsEffectMemberCallNamed(first, propertyName)\n ));\n}\n\nfunction isPipeCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n if (call.type !== \"CallExpression\") {\n return false;\n }\n\n if (isIdentifier(call.callee, \"pipe\")) {\n return true;\n }\n\n const callee = call.callee;\n return (\n typeof callee === \"object\" &&\n callee !== null &&\n (callee as Node).type === \"MemberExpression\" &&\n (callee as Node).computed !== true &&\n isIdentifier((callee as Node).property, \"pipe\")\n );\n}\n\nfunction containsPipeCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isPipeCall(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsPipeCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsPipeCall(child, seen)\n ));\n}\n\nfunction isArrowIifeCall(node: unknown): node is Node & { callee: Node; arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n Array.isArray(call.arguments) &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"ArrowFunctionExpression\"\n );\n}\n\nfunction isInlineFunctionIifeCall(node: unknown): node is Node & { callee: Node; arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n Array.isArray(call.arguments) &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n ((call.callee as Node).type === \"ArrowFunctionExpression\" ||\n (call.callee as Node).type === \"FunctionExpression\")\n );\n}\n\nfunction findArrowIifeCall(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (isArrowIifeCall(node)) {\n return node;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findArrowIifeCall(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findArrowIifeCall(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction findReturnStatements(node: unknown, seen = new WeakSet<object>()): unknown[] {\n if (Array.isArray(node)) {\n return node.flatMap((child) => findReturnStatements(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return [];\n }\n\n if (seen.has(node)) {\n return [];\n }\n seen.add(node);\n\n if ((node as Node).type === \"ReturnStatement\") {\n return [node];\n }\n\n return Object.entries(node).flatMap(([key, child]) => (\n key === \"parent\" ? [] : findReturnStatements(child, seen)\n ));\n}\n\nfunction isSchemaFilterCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n (isMemberExpression(call.callee, \"S\", \"filter\") ||\n isMemberExpression(call.callee, \"Schema\", \"filter\"))\n );\n}\n\nfunction directArrowCallbackReturns(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null) {\n return [];\n }\n\n const call = node as Node;\n if (call.type !== \"CallExpression\" || !Array.isArray(call.arguments) || isSchemaFilterCall(call)) {\n return [];\n }\n\n return call.arguments.flatMap((argument) => {\n if (\n typeof argument !== \"object\" ||\n argument === null ||\n (argument as Node).type !== \"ArrowFunctionExpression\"\n ) {\n return [];\n }\n\n const body = (argument as Node).body;\n if (typeof body !== \"object\" || body === null || (body as Node).type !== \"BlockStatement\") {\n return [];\n }\n\n return findReturnStatements(body);\n });\n}\n\nfunction directFunctionCallbackReturns(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null) {\n return [];\n }\n\n const call = node as Node;\n if (call.type !== \"CallExpression\" || !Array.isArray(call.arguments)) {\n return [];\n }\n\n return call.arguments.flatMap((argument) => {\n if (\n typeof argument !== \"object\" ||\n argument === null ||\n (argument as Node).type !== \"FunctionExpression\" ||\n (argument as Node).generator === true\n ) {\n return [];\n }\n\n return findReturnStatements((argument as Node).body);\n });\n}\n\nfunction isGeneratorFunctionExpression(node: unknown): node is Node & { body: unknown } {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"FunctionExpression\" &&\n (node as Node).generator === true\n );\n}\n\nfunction getEffectGeneratorArgument(\n node: unknown,\n propertyName: \"fn\" | \"gen\",\n): (Node & { body: unknown }) | undefined {\n if (!isEffectMemberCallNamed(node, propertyName)) {\n return undefined;\n }\n\n const fn = firstArgument(node);\n return isGeneratorFunctionExpression(fn) ? fn : undefined;\n}\n\nfunction isEffectGeneratorCall(node: unknown, propertyName: \"fn\" | \"gen\"): boolean {\n return getEffectGeneratorArgument(node, propertyName) !== undefined;\n}\n\nfunction findYieldWithoutStar(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findYieldWithoutStar(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n if ((node as Node).type === \"YieldExpression\" && (node as Node).delegate !== true) {\n return node;\n }\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findYieldWithoutStar(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction findYieldWithoutStarInEffectGen(node: unknown): unknown | undefined {\n const generator = getEffectGeneratorArgument(node, \"gen\");\n return generator ? findYieldWithoutStar(generator.body) : undefined;\n}\n\nfunction isAsyncFunctionCallback(node: unknown): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n ((node as Node).type === \"ArrowFunctionExpression\" ||\n (node as Node).type === \"FunctionExpression\") &&\n (node as Node).async === true\n );\n}\n\nconst effectAsyncCallbackCombinators = new Set([\n \"andThen\",\n \"catchAll\",\n \"catchTag\",\n \"filterOrFail\",\n \"flatMap\",\n \"forEach\",\n \"map\",\n \"orElse\",\n \"tap\",\n]);\n\nfunction findAsyncEffectCombinatorCallback(node: unknown): unknown | undefined {\n if (!isEffectMemberCall(node)) {\n return undefined;\n }\n\n const callee = node.callee as Node;\n const property = callee.property;\n if (!isIdentifier(property) || !effectAsyncCallbackCombinators.has(property.name)) {\n return undefined;\n }\n\n return node.arguments.find((argument) => isAsyncFunctionCallback(argument));\n}\n\nfunction findThrowStatement(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findThrowStatement(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n if ((node as Node).type === \"ThrowStatement\") {\n return node;\n }\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findThrowStatement(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction findThrowInEffectLogic(node: unknown): unknown | undefined {\n const generator = getEffectGeneratorArgument(node, \"gen\");\n if (generator) {\n return findThrowStatement(generator.body);\n }\n\n if (!isEffectMemberCall(node)) {\n return undefined;\n }\n\n const callee = node.callee as Node;\n const property = callee.property;\n if (!isIdentifier(property) || !effectAsyncCallbackCombinators.has(property.name)) {\n return undefined;\n }\n\n for (const argument of node.arguments) {\n const body = callbackBody(argument);\n const match = body ? findThrowStatement(body) : undefined;\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction findTryStatement(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findTryStatement(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n if ((node as Node).type === \"TryStatement\") {\n return node;\n }\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findTryStatement(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction findTryCatchInEffectLogic(node: unknown): unknown | undefined {\n const generator = getEffectGeneratorArgument(node, \"gen\");\n if (generator) {\n return findTryStatement(generator.body);\n }\n\n if (!isEffectMemberCall(node)) {\n return undefined;\n }\n\n const callee = node.callee as Node;\n const property = callee.property;\n if (!isIdentifier(property) || !effectAsyncCallbackCombinators.has(property.name)) {\n return undefined;\n }\n\n for (const argument of node.arguments) {\n const body = callbackBody(argument);\n const match = body ? findTryStatement(body) : undefined;\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction isPromiseStaticApiCall(node: unknown): boolean {\n return (\n isMemberCall(node, \"Promise\", \"all\") ||\n isMemberCall(node, \"Promise\", \"allSettled\") ||\n isMemberCall(node, \"Promise\", \"any\") ||\n isMemberCall(node, \"Promise\", \"race\") ||\n isMemberCall(node, \"Promise\", \"reject\") ||\n isMemberCall(node, \"Promise\", \"resolve\")\n );\n}\n\nfunction isPromiseChainCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"CallExpression\") {\n return false;\n }\n\n const callee = (node as Node).callee;\n return (\n typeof callee === \"object\" &&\n callee !== null &&\n (callee as Node).type === \"MemberExpression\" &&\n (callee as Node).computed !== true &&\n (isIdentifier((callee as Node).property, \"then\") ||\n isIdentifier((callee as Node).property, \"catch\") ||\n isIdentifier((callee as Node).property, \"finally\"))\n );\n}\n\nfunction findPromiseApiCall(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findPromiseApiCall(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n if (isPromiseStaticApiCall(node) || isPromiseChainCall(node)) {\n return node;\n }\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findPromiseApiCall(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction findPromiseApiInEffectLogic(node: unknown): unknown | undefined {\n const generator = getEffectGeneratorArgument(node, \"gen\");\n if (generator) {\n return findPromiseApiCall(generator.body);\n }\n\n if (!isEffectMemberCall(node)) {\n return undefined;\n }\n\n const callee = node.callee as Node;\n const property = callee.property;\n if (!isIdentifier(property) || !effectAsyncCallbackCombinators.has(property.name)) {\n return undefined;\n }\n\n for (const argument of node.arguments) {\n const body = callbackBody(argument);\n const match = body ? findPromiseApiCall(body) : undefined;\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nconst effectRunMethods = new Set([\n \"runCallback\",\n \"runFork\",\n \"runPromise\",\n \"runPromiseExit\",\n \"runSync\",\n \"runSyncExit\",\n]);\n\nfunction isEffectRunCall(node: unknown): boolean {\n if (!isEffectMemberCall(node)) {\n return false;\n }\n\n const callee = node.callee as Node;\n const property = callee.property;\n return isIdentifier(property) && effectRunMethods.has(property.name);\n}\n\nfunction isEffectOrDieReference(node: unknown): boolean {\n return (\n isMemberExpression(node, \"Effect\", \"orDie\") ||\n isMemberExpression(node, \"Effect\", \"orDieWith\") ||\n isEffectMemberCallNamed(node, \"orDie\") ||\n isEffectMemberCallNamed(node, \"orDieWith\")\n );\n}\n\nfunction findEffectOrDieOutsideBoundary(node: unknown): unknown | undefined {\n if (isEffectOrDieReference(node)) {\n return node;\n }\n\n if (isPipeCall(node)) {\n return pipeParts(node).find((part) => isEffectOrDieReference(part));\n }\n\n return undefined;\n}\n\nfunction isSwallowedCatchAllBody(node: unknown): boolean {\n return (\n isEffectMemberCallNamed(node, \"succeed\") ||\n isEffectMemberCallNamed(node, \"asVoid\") ||\n isEffectMemberCallNamed(node, \"ignore\") ||\n isEffectVoidMember(node)\n );\n}\n\nfunction getSwallowedCatchAllHandler(node: unknown): unknown | undefined {\n if (!isEffectMemberCallNamed(node, \"catchAll\")) {\n return undefined;\n }\n\n const handler = firstArgument(node);\n const body = callbackBody(handler);\n return isSwallowedCatchAllBody(body) ? body : undefined;\n}\n\nfunction isEffectIgnoreReference(node: unknown): boolean {\n return isMemberExpression(node, \"Effect\", \"ignore\") || isEffectMemberCallNamed(node, \"ignore\");\n}\n\nfunction findEffectIgnore(node: unknown): unknown | undefined {\n if (isEffectIgnoreReference(node)) {\n return node;\n }\n\n if (isPipeCall(node)) {\n return pipeParts(node).find((part) => isEffectIgnoreReference(part));\n }\n\n return undefined;\n}\n\nfunction isConsoleCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"MemberExpression\" &&\n (call.callee as Node).computed !== true &&\n isIdentifier((call.callee as Node).object, \"console\") &&\n isIdentifier((call.callee as Node).property)\n );\n}\n\nfunction isIdentifierCall(node: unknown, name: string): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return call.type === \"CallExpression\" && isIdentifier(call.callee, name);\n}\n\nfunction isMemberCall(node: unknown, objectName: string, propertyName?: string): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"MemberExpression\" &&\n (call.callee as Node).computed !== true &&\n isIdentifier((call.callee as Node).object, objectName) &&\n isIdentifier((call.callee as Node).property) &&\n (propertyName === undefined || isIdentifier((call.callee as Node).property, propertyName))\n );\n}\n\nfunction isEffectLogCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n if (\n call.type !== \"CallExpression\" ||\n typeof call.callee !== \"object\" ||\n call.callee === null ||\n (call.callee as Node).type !== \"MemberExpression\" ||\n (call.callee as Node).computed === true ||\n !isIdentifier((call.callee as Node).object, \"Effect\") ||\n !isIdentifier((call.callee as Node).property)\n ) {\n return false;\n }\n\n return ((call.callee as Node).property as { name: string }).name.startsWith(\"log\");\n}\n\nfunction containsConsoleCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isConsoleCall(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsConsoleCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsConsoleCall(child, seen)\n ));\n}\n\nfunction containsWrapperSideEffect(node: unknown, seen = new WeakSet<object>()): boolean {\n if (\n isIdentifierCall(node, \"setState\") ||\n isMemberCall(node, \"Atom\", \"set\") ||\n isIdentifierCall(node, \"invalidate\") ||\n isEffectLogCall(node) ||\n isConsoleCall(node)\n ) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsWrapperSideEffect(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsWrapperSideEffect(child, seen)\n ));\n}\n\nfunction containsAllStepSideEffect(node: unknown, seen = new WeakSet<object>()): boolean {\n if (\n isMemberCall(node, \"Ref\", \"set\") ||\n isMemberCall(node, \"Atom\", \"set\") ||\n isMemberCall(node, \"SubscriptionRef\", \"set\") ||\n isMemberCall(node, \"Reactivity\", \"invalidate\") ||\n isMemberCall(node, \"Fiber\", \"interrupt\") ||\n isEffectLogCall(node)\n ) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsAllStepSideEffect(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsAllStepSideEffect(child, seen)\n ));\n}\n\nfunction hasConcurrencyOne(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const object = node as Node;\n if (object.type !== \"ObjectExpression\" || !Array.isArray(object.properties)) {\n return false;\n }\n\n return object.properties.some((entry) => {\n if (typeof entry !== \"object\" || entry === null) {\n return false;\n }\n\n const prop = entry as Node;\n const key = prop.key;\n const value = prop.value as Node | undefined;\n return (\n ((isIdentifier(key, \"concurrency\")) ||\n (typeof key === \"object\" && key !== null && (key as Node).value === \"concurrency\")) &&\n typeof value === \"object\" &&\n value !== null &&\n ((value.type === \"Literal\" || value.type === \"NumericLiteral\") && value.value === 1)\n );\n });\n}\n\nfunction isEffectAsVoidPipeArgument(node: unknown): boolean {\n return isMemberExpression(node, \"Effect\", \"asVoid\") || isMemberCall(node, \"Effect\", \"asVoid\");\n}\n\nfunction isEffectAllAsVoidPipe(node: unknown): node is Node & { callee: Node; arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n if (\n call.type !== \"CallExpression\" ||\n !Array.isArray(call.arguments) ||\n typeof call.callee !== \"object\" ||\n call.callee === null ||\n (call.callee as Node).type !== \"MemberExpression\" ||\n (call.callee as Node).computed === true ||\n !isIdentifier((call.callee as Node).property, \"pipe\")\n ) {\n return false;\n }\n\n return (\n isEffectMemberCallNamed((call.callee as Node).object, \"all\") &&\n call.arguments.some((argument) => isEffectAsVoidPipeArgument(argument))\n );\n}\n\nfunction pipeParts(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null || !isPipeCall(node)) {\n return [];\n }\n\n const call = node as Node & { arguments: unknown[] };\n if (isIdentifier(call.callee, \"pipe\")) {\n return call.arguments;\n }\n\n const callee = call.callee as Node;\n return [callee.object, ...call.arguments];\n}\n\nfunction isPipeStartingWithEffect(node: unknown): boolean {\n const [first] = pipeParts(node);\n return first !== undefined && containsAnyEffectMemberCall(first);\n}\n\nfunction isEffectWrapperAliasExpression(node: unknown): boolean {\n if (isPipeStartingWithEffect(node)) {\n return true;\n }\n\n if (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"ArrowFunctionExpression\"\n ) {\n const body = (node as Node).body;\n return isEffectMemberCall(body) || isPipeStartingWithEffect(body);\n }\n\n return false;\n}\n\nfunction hasEffectWrapperAliasReturn(node: unknown): boolean {\n return findReturnStatements(node).some((returnNode) => (\n typeof returnNode === \"object\" &&\n returnNode !== null &&\n (isEffectWrapperAliasExpression((returnNode as Node).argument) ||\n isEffectMemberCall((returnNode as Node).argument))\n ));\n}\n\nfunction isQualifiedTypeReference(node: unknown, leftName: string, rightName: string): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"TSTypeReference\") {\n return false;\n }\n\n const typeName = (node as Node).typeName;\n return (\n typeof typeName === \"object\" &&\n typeName !== null &&\n (typeName as Node).type === \"TSQualifiedName\" &&\n isIdentifier((typeName as Node).left, leftName) &&\n isIdentifier((typeName as Node).right, rightName)\n );\n}\n\nfunction isIdentifierTypeReference(node: unknown, name: string): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"TSTypeReference\" &&\n isIdentifier((node as Node).typeName, name)\n );\n}\n\nfunction typeArguments(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null) {\n return [];\n }\n\n const container = (node as Node).typeParameters ?? (node as Node).typeArguments;\n if (typeof container !== \"object\" || container === null) {\n return [];\n }\n\n const params = (container as Node).params ?? (container as Node).arguments;\n return Array.isArray(params) ? params : [];\n}\n\nfunction isGenericErrorType(node: unknown): boolean {\n return isIdentifier(node, \"Error\") || isIdentifierTypeReference(node, \"Error\");\n}\n\nfunction returnTypeAnnotation(node: unknown): unknown | undefined {\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n const returnType = (node as Node).returnType;\n if (typeof returnType !== \"object\" || returnType === null) {\n return undefined;\n }\n\n return (returnType as Node).typeAnnotation ?? returnType;\n}\n\nfunction genericEffectErrorReturnType(node: unknown): unknown | undefined {\n const annotation = returnTypeAnnotation(node);\n if (!isQualifiedTypeReference(annotation, \"Effect\", \"Effect\")) {\n return undefined;\n }\n\n const [, error] = typeArguments(annotation);\n return isGenericErrorType(error) ? annotation : undefined;\n}\n\nfunction exportedGenericEffectErrorTarget(node: unknown): unknown | undefined {\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n const exportNode = node as Node;\n if (\n exportNode.type !== \"ExportNamedDeclaration\" &&\n exportNode.type !== \"ExportDefaultDeclaration\"\n ) {\n return undefined;\n }\n\n const declaration = exportNode.declaration;\n if (typeof declaration !== \"object\" || declaration === null) {\n return undefined;\n }\n\n if ((declaration as Node).type === \"FunctionDeclaration\") {\n return genericEffectErrorReturnType(declaration);\n }\n\n if ((declaration as Node).type !== \"VariableDeclaration\") {\n return undefined;\n }\n\n for (const declarator of ((declaration as Node).declarations as unknown[] | undefined) ?? []) {\n if (typeof declarator !== \"object\" || declarator === null) {\n continue;\n }\n\n const init = (declarator as Node).init;\n if (\n typeof init === \"object\" &&\n init !== null &&\n ((init as Node).type === \"ArrowFunctionExpression\" ||\n (init as Node).type === \"FunctionExpression\")\n ) {\n const target = genericEffectErrorReturnType(init);\n if (target) {\n return target;\n }\n }\n }\n\n return undefined;\n}\n\nfunction containsQualifiedTypeReference(\n node: unknown,\n leftName: string,\n rightName: string,\n seen = new WeakSet<object>(),\n): boolean {\n if (isQualifiedTypeReference(node, leftName, rightName)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsQualifiedTypeReference(child, leftName, rightName, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsQualifiedTypeReference(child, leftName, rightName, seen)\n ));\n}\n\nfunction containsWrapGraphqlCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isIdentifierCall(node, \"wrapGraphqlCall\")) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsWrapGraphqlCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsWrapGraphqlCall(child, seen)\n ));\n}\n\nfunction isApplyResponseFlatMap(node: unknown): boolean {\n return (\n isEffectMemberCallNamed(node, \"flatMap\") &&\n isIdentifier(firstArgument(node), \"applyResponse\")\n );\n}\n\nfunction containsApplyResponseFlatMap(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isApplyResponseFlatMap(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsApplyResponseFlatMap(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsApplyResponseFlatMap(child, seen)\n ));\n}\n\nfunction findEffectCatchAll(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (isEffectMemberCallNamed(node, \"catchAll\")) {\n return node;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findEffectCatchAll(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findEffectCatchAll(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction getWrapGraphqlCatchAll(node: unknown): unknown | undefined {\n const parts = pipeParts(node);\n if (parts.length === 0) {\n return undefined;\n }\n\n const catchAll = findEffectCatchAll(parts);\n if (!catchAll) {\n return undefined;\n }\n\n return containsWrapGraphqlCall(parts) || containsApplyResponseFlatMap(parts)\n ? catchAll\n : undefined;\n}\n\nconst atomOperationMethods = new Set([\"get\", \"set\", \"update\", \"modify\", \"refresh\"]);\n\nfunction callbackBody(node: unknown): unknown | undefined {\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n const callback = node as Node;\n if (callback.type !== \"ArrowFunctionExpression\" && callback.type !== \"FunctionExpression\") {\n return undefined;\n }\n\n return callback.body;\n}\n\nfunction isAtomOperationCall(node: unknown): node is Node & { arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n if (\n call.type !== \"CallExpression\" ||\n !Array.isArray(call.arguments) ||\n typeof call.callee !== \"object\" ||\n call.callee === null ||\n (call.callee as Node).type !== \"MemberExpression\" ||\n (call.callee as Node).computed === true\n ) {\n return false;\n }\n\n const callee = call.callee as Node;\n return (\n (isIdentifier(callee.object, \"Atom\") || isIdentifier(callee.object, \"atomRegistry\")) &&\n isIdentifier(callee.property) &&\n atomOperationMethods.has((callee.property as { name: string }).name)\n );\n}\n\nfunction findAtomOperationCall(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (isAtomOperationCall(node)) {\n return node;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findAtomOperationCall(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findAtomOperationCall(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction findAtomOperationInsideEffectSync(node: unknown): unknown | undefined {\n if (!isEffectMemberCallNamed(node, \"sync\")) {\n return undefined;\n }\n\n const body = callbackBody(firstArgument(node));\n return body ? findAtomOperationCall(body) : undefined;\n}\n\nfunction isCollectionAtomIdentifier(node: unknown): boolean {\n if (!isIdentifier(node)) {\n return false;\n }\n\n return /(CollectionAtom|ListAtom|Visible.*Atom|ResultsAtom|ReadStateAtom)$/.test(node.name);\n}\n\nfunction getCollectionAtomReadTarget(node: unknown): unknown | undefined {\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n const call = node as Node;\n if (call.type !== \"CallExpression\" || !Array.isArray(call.arguments)) {\n return undefined;\n }\n\n const isFamilyRead =\n isIdentifier(call.callee, \"get\") ||\n isMemberExpression(call.callee, \"Atom\", \"get\") ||\n isMemberExpression(call.callee, \"get\", \"get\");\n\n if (!isFamilyRead) {\n return undefined;\n }\n\n const [atom] = call.arguments;\n return isCollectionAtomIdentifier(atom) ? atom : undefined;\n}\n\nfunction findFamilyCollectionRead(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n const target = getCollectionAtomReadTarget(node);\n if (target) {\n return target;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findFamilyCollectionRead(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findFamilyCollectionRead(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction isEffectProvideWithSingleArgument(node: unknown): boolean {\n return isEffectMemberCallNamed(node, \"provide\") && node.arguments.length === 1;\n}\n\nfunction findInlineRuntimeProvide(node: unknown): unknown | undefined {\n if (!isPipeCall(node)) {\n return undefined;\n }\n\n return pipeParts(node).find((part) => isEffectProvideWithSingleArgument(part));\n}\n\nfunction hasObjectSpread(node: unknown, seen = new WeakSet<object>()): boolean {\n if (typeof node === \"object\" && node !== null && (node as Node).type === \"SpreadElement\") {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => hasObjectSpread(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && hasObjectSpread(child, seen)\n ));\n}\n\nfunction isRefStateUpdateWithSpread(node: unknown): boolean {\n if (!isMemberCall(node, \"Ref\", \"update\") && !isMemberCall(node, \"Ref\", \"modify\")) {\n return false;\n }\n\n const callback = (node as Node & { arguments: unknown[] }).arguments[1];\n const body = callbackBody(callback);\n return hasObjectSpread(body);\n}\n\nfunction isEmptyObjectExpression(node: unknown): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"ObjectExpression\" &&\n Array.isArray((node as Node).properties) &&\n ((node as Node).properties as unknown[]).length === 0\n );\n}\n\nfunction containsObjectEntriesCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isMemberCall(node, \"Object\", \"entries\")) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsObjectEntriesCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsObjectEntriesCall(child, seen)\n ));\n}\n\nfunction isNakedObjectStateUpdate(node: unknown): boolean {\n if (isRefStateUpdateWithSpread(node)) {\n return true;\n }\n\n if (isMemberCall(node, \"Object\", \"assign\")) {\n const args = (node as Node & { arguments: unknown[] }).arguments;\n return args.length >= 3 && isEmptyObjectExpression(args[0]);\n }\n\n if (isMemberCall(node, \"Object\", \"fromEntries\")) {\n return containsObjectEntriesCall((node as Node & { arguments: unknown[] }).arguments[0]);\n }\n\n return isMemberCall(node, \"JSON\", \"stringify\") || isMemberCall(node, \"JSON\", \"parse\");\n}\n\nfunction isEffectSucceedVariableArgument(node: unknown): boolean {\n if (isIdentifier(node)) {\n return true;\n }\n\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"MemberExpression\"\n );\n}\n\nfunction isVariableAsAssertion(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"VariableDeclaration\") {\n return false;\n }\n\n return ((node as Node).declarations as unknown[] | undefined)?.some((declaration) => {\n if (typeof declaration !== \"object\" || declaration === null) {\n return false;\n }\n\n const init = (declaration as Node).init;\n return (\n typeof init === \"object\" &&\n init !== null &&\n (init as Node).type === \"TSAsExpression\" &&\n typeof (init as Node).typeAnnotation === \"object\" &&\n (init as Node).typeAnnotation !== null &&\n ((init as Node).typeAnnotation as Node).type !== \"TSConstKeyword\"\n );\n }) ?? false;\n}\n\nfunction isTypeofBooleanCheck(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"BinaryExpression\") {\n return false;\n }\n\n const binary = node as Node;\n if (binary.operator !== \"===\") {\n return false;\n }\n\n const left = binary.left;\n const right = binary.right;\n return (\n typeof left === \"object\" &&\n left !== null &&\n (left as Node).type === \"UnaryExpression\" &&\n (left as Node).operator === \"typeof\" &&\n typeof right === \"object\" &&\n right !== null &&\n ((right as Node).type === \"Literal\" || (right as Node).type === \"StringLiteral\") &&\n (right as Node).value === \"boolean\"\n );\n}\n\nfunction isMatchOrElseNullCall(node: unknown): boolean {\n return isMatchBranchCall(node, \"orElse\") && isNullLiteral(arrowCallbackBody(node.arguments[0]));\n}\n\nfunction isStringLiteral(node: unknown): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n ((node as Node).type === \"Literal\" || (node as Node).type === \"StringLiteral\") &&\n typeof (node as Node).value === \"string\"\n );\n}\n\nfunction isUndefinedIdentifier(node: unknown): boolean {\n return isIdentifier(node, \"undefined\");\n}\n\nfunction isNullishRewrap(node: unknown): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"LogicalExpression\" &&\n (node as Node).operator === \"??\" &&\n (isNullLiteral((node as Node).right) || isUndefinedIdentifier((node as Node).right))\n );\n}\n\nfunction isOptionFromNullableNullishCoalesce(node: unknown): boolean {\n return (\n isMemberCall(node, \"Option\", \"fromNullable\") &&\n isNullishRewrap((node as Node & { arguments: unknown[] }).arguments[0])\n );\n}\n\nfunction objectPropertyValue(node: unknown, keyName: string): unknown | undefined {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"ObjectExpression\") {\n return undefined;\n }\n\n for (const property of ((node as Node).properties as unknown[] | undefined) ?? []) {\n if (typeof property !== \"object\" || property === null) {\n continue;\n }\n\n const key = (property as Node).key;\n if (isIdentifier(key, keyName)) {\n return (property as Node).value;\n }\n }\n\n return undefined;\n}\n\nfunction isBooleanTrueComparison(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"BinaryExpression\") {\n return false;\n }\n\n const binary = node as Node;\n return (\n binary.operator === \"===\" &&\n (isBooleanLiteral(binary.left, true) || isBooleanLiteral(binary.right, true))\n );\n}\n\nfunction isOptionBooleanNormalization(node: unknown): boolean {\n if (!isMemberCall(node, \"Option\", \"match\")) {\n return false;\n }\n\n const config = (node as Node & { arguments: unknown[] }).arguments[1];\n const onSome = objectPropertyValue(config, \"onSome\");\n const onNone = objectPropertyValue(config, \"onNone\");\n return (\n isBooleanTrueComparison(arrowCallbackBody(onSome)) &&\n isBooleanLiteral(arrowCallbackBody(onNone), false)\n );\n}\n\nfunction isStringSentinelConst(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"VariableDeclaration\") {\n return false;\n }\n\n return ((node as Node).declarations as unknown[] | undefined)?.some((declaration) => (\n typeof declaration === \"object\" &&\n declaration !== null &&\n isStringLiteral((declaration as Node).init)\n )) ?? false;\n}\n\nfunction isBooleanLiteral(node: unknown, value: boolean): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n ((node as Node).type === \"Literal\" || (node as Node).type === \"BooleanLiteral\") &&\n (node as Node).value === value\n );\n}\n\nfunction isEffectVoidMember(node: unknown): boolean {\n return isMemberExpression(node, \"Effect\", \"void\");\n}\n\nfunction isMatchBranchCall(node: unknown, propertyName?: \"when\" | \"orElse\"): node is Node & { arguments: unknown[] } {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n Array.isArray(call.arguments) &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"MemberExpression\" &&\n (call.callee as Node).computed !== true &&\n isIdentifier((call.callee as Node).object, \"Match\") &&\n isIdentifier((call.callee as Node).property) &&\n (propertyName === undefined || isIdentifier((call.callee as Node).property, propertyName))\n );\n}\n\nfunction arrowCallbackBody(node: unknown): unknown | undefined {\n if (\n typeof node !== \"object\" ||\n node === null ||\n (node as Node).type !== \"ArrowFunctionExpression\"\n ) {\n return undefined;\n }\n\n return (node as Node).body;\n}\n\nfunction isVoidMatchBranch(node: unknown): boolean {\n if (!isMatchBranchCall(node)) {\n return false;\n }\n\n const [first, second] = node.arguments;\n if (isIdentifier((node.callee as Node).property, \"when\")) {\n return (\n (isBooleanLiteral(first, true) || isBooleanLiteral(first, false)) &&\n isEffectVoidMember(arrowCallbackBody(second))\n );\n }\n\n return (\n isIdentifier((node.callee as Node).property, \"orElse\") &&\n isEffectVoidMember(arrowCallbackBody(first))\n );\n}\n\nconst branchSequencingEffectCalls = [\"flatMap\", \"map\", \"andThen\", \"tap\", \"zipRight\"] as const;\n\nfunction isStreamMemberCall(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n return (\n call.type === \"CallExpression\" &&\n typeof call.callee === \"object\" &&\n call.callee !== null &&\n (call.callee as Node).type === \"MemberExpression\" &&\n (call.callee as Node).computed !== true &&\n isIdentifier((call.callee as Node).object, \"Stream\") &&\n isIdentifier((call.callee as Node).property)\n );\n}\n\nfunction containsAnyEffectMemberCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isEffectMemberCall(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsAnyEffectMemberCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsAnyEffectMemberCall(child, seen)\n ));\n}\n\nfunction containsBranchSequencingCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (\n branchSequencingEffectCalls.some((propertyName) => isEffectMemberCallNamed(node, propertyName)) ||\n isPipeCall(node) ||\n isStreamMemberCall(node)\n ) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsBranchSequencingCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsBranchSequencingCall(child, seen)\n ));\n}\n\nfunction isSequencingBranchBody(node: unknown): boolean {\n return containsAnyEffectMemberCall(node) && containsBranchSequencingCall(node);\n}\n\nfunction containsSequencingMatchBranch(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isMatchBranchCall(node)) {\n const body = isIdentifier((node.callee as Node).property, \"when\")\n ? arrowCallbackBody(node.arguments[1])\n : arrowCallbackBody(node.arguments[0]);\n\n if (isSequencingBranchBody(body)) {\n return true;\n }\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsSequencingMatchBranch(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsSequencingMatchBranch(child, seen)\n ));\n}\n\nfunction containsMatchBranchCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isMatchBranchCall(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsMatchBranchCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsMatchBranchCall(child, seen)\n ));\n}\n\nfunction isOptionMatchCall(node: unknown): node is Node & { arguments: unknown[] } {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"CallExpression\" &&\n Array.isArray((node as Node).arguments) &&\n isMemberExpression((node as Node).callee, \"Option\", \"match\")\n );\n}\n\nfunction isExpressionBodiedArrowCall(node: unknown): boolean {\n const body = arrowCallbackBody(node);\n return (\n typeof body === \"object\" &&\n body !== null &&\n (body as Node).type === \"CallExpression\"\n );\n}\n\nfunction findEffectGenCall(node: unknown, seen = new WeakSet<object>()): unknown | undefined {\n if (isEffectMemberCallNamed(node, \"gen\")) {\n return node;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const match = findEffectGenCall(child, seen);\n if (match) {\n return match;\n }\n }\n return undefined;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n if (seen.has(node)) {\n return undefined;\n }\n seen.add(node);\n\n for (const [key, child] of Object.entries(node)) {\n if (key === \"parent\") {\n continue;\n }\n\n const match = findEffectGenCall(child, seen);\n if (match) {\n return match;\n }\n }\n\n return undefined;\n}\n\nfunction isMatchValuePipeCall(node: unknown): boolean {\n if (!isPipeCall(node) || typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const call = node as Node;\n const callee = call.callee as Node;\n const object = callee.object;\n return (\n typeof object === \"object\" &&\n object !== null &&\n (object as Node).type === \"CallExpression\" &&\n isMemberExpression((object as Node).callee, \"Match\", \"value\")\n );\n}\n\nfunction isObjectBranchCall(node: unknown): boolean {\n return (\n isMatchValuePipeCall(node) ||\n (typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"CallExpression\" &&\n (isMemberExpression((node as Node).callee, \"Option\", \"match\") ||\n isMemberExpression((node as Node).callee, \"Either\", \"match\")))\n );\n}\n\nfunction containsObjectBranchCall(node: unknown, seen = new WeakSet<object>()): boolean {\n if (isObjectBranchCall(node)) {\n return true;\n }\n\n if (Array.isArray(node)) {\n return node.some((child) => containsObjectBranchCall(child, seen));\n }\n\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n if (seen.has(node)) {\n return false;\n }\n seen.add(node);\n\n return Object.entries(node).some(([key, child]) => (\n key !== \"parent\" && containsObjectBranchCall(child, seen)\n ));\n}\n\nfunction objectPropertyValues(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null) {\n return [];\n }\n\n const object = node as Node;\n if (object.type !== \"ObjectExpression\" || !Array.isArray(object.properties)) {\n return [];\n }\n\n return object.properties\n .map((property) => (\n typeof property === \"object\" && property !== null ? (property as Node).value : undefined\n ))\n .filter((value) => value !== undefined);\n}\n\nfunction isRawDomainIdAlias(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"TSTypeAliasDeclaration\") {\n return false;\n }\n\n const aliasName = (node as Node).id;\n const typeAnnotation = (node as Node).typeAnnotation as Node | undefined;\n return (\n isIdentifier(aliasName) &&\n /(?:Id|ID)$/.test(aliasName.name) &&\n (typeAnnotation?.type === \"TSStringKeyword\" || typeAnnotation?.type === \"TSNumberKeyword\")\n );\n}\n\nfunction isBooleanTypeAnnotation(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const annotation = node as Node;\n if (annotation.type === \"TSBooleanKeyword\") {\n return true;\n }\n\n return (\n annotation.type === \"TSTypeAnnotation\" &&\n typeof annotation.typeAnnotation === \"object\" &&\n annotation.typeAnnotation !== null &&\n (annotation.typeAnnotation as Node).type === \"TSBooleanKeyword\"\n );\n}\n\nfunction unwrapTypeAnnotation(node: unknown): Node | undefined {\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n const annotation = node as Node;\n if (\n annotation.type === \"TSTypeAnnotation\" &&\n typeof annotation.typeAnnotation === \"object\" &&\n annotation.typeAnnotation !== null\n ) {\n return annotation.typeAnnotation as Node;\n }\n\n return annotation;\n}\n\nfunction isStringOrNumberTypeAnnotation(node: unknown): boolean {\n const annotation = unwrapTypeAnnotation(node);\n return annotation?.type === \"TSStringKeyword\" || annotation?.type === \"TSNumberKeyword\";\n}\n\nfunction isAnyOrObjectTypeAnnotation(node: unknown): boolean {\n const annotation = unwrapTypeAnnotation(node);\n return annotation?.type === \"TSAnyKeyword\" || annotation?.type === \"TSObjectKeyword\";\n}\n\nfunction isDateTypeAnnotation(node: unknown): boolean {\n const annotation = unwrapTypeAnnotation(node);\n return (\n annotation?.type === \"TSTypeReference\" &&\n isIdentifier((annotation as Node).typeName, \"Date\")\n );\n}\n\nfunction primitiveDomainParameters(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null || !Array.isArray((node as Node).params)) {\n return [];\n }\n\n const domainNamePattern =\n /(?:id|amount|currency|account|user|order|customer|invoice|payment|price|total|quantity|transfer|fund|balance)/i;\n return ((node as Node).params as unknown[]).filter((param) => (\n isIdentifier(param) &&\n isStringOrNumberTypeAnnotation((param as Node).typeAnnotation) &&\n domainNamePattern.test(param.name)\n ));\n}\n\nfunction hasPrimitiveHeavyDomainParameters(node: unknown): boolean {\n return primitiveDomainParameters(node).length >= 3;\n}\n\nfunction isBooleanDomainFlagParameter(node: unknown): boolean {\n if (!isIdentifier(node)) {\n return false;\n }\n\n return (\n /^(?:is|has|should|with|allow|enable|can|use)[A-Z0-9_]/.test(node.name) &&\n isBooleanTypeAnnotation((node as Node).typeAnnotation)\n );\n}\n\nfunction functionBooleanDomainFlagParameters(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null || !Array.isArray((node as Node).params)) {\n return [];\n }\n\n return ((node as Node).params as unknown[]).filter(isBooleanDomainFlagParameter);\n}\n\nfunction getPropertyName(node: unknown): string | undefined {\n if (isIdentifier(node)) {\n return node.name;\n }\n\n if (typeof node === \"object\" && node !== null && typeof (node as Node).value === \"string\") {\n return (node as Node).value as string;\n }\n\n return undefined;\n}\n\nfunction isRawTimeFieldName(name: string): boolean {\n return /(?:createdAt|updatedAt|expiresAt|expiredAt|renewedAt|startedAt|endedAt|deletedAt|timestamp|timeoutMs|durationMs|ttlMs|ttl)$/i.test(name);\n}\n\nfunction isRawTimeDomainField(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"TSPropertySignature\") {\n return false;\n }\n\n const property = node as Node;\n const propertyName = getPropertyName(property.key);\n const typeAnnotation = property.typeAnnotation;\n return (\n propertyName !== undefined &&\n isRawTimeFieldName(propertyName) &&\n (isStringOrNumberTypeAnnotation(typeAnnotation) || isDateTypeAnnotation(typeAnnotation))\n );\n}\n\nfunction typeMembers(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null) {\n return [];\n }\n\n const object = node as Node;\n if (\n object.type === \"TSInterfaceDeclaration\" &&\n typeof object.body === \"object\" &&\n object.body !== null &&\n Array.isArray((object.body as Node).body)\n ) {\n return (object.body as Node).body as unknown[];\n }\n\n if (object.type === \"TSTypeLiteral\" && Array.isArray(object.members)) {\n return object.members as unknown[];\n }\n\n return [];\n}\n\nfunction rawTimeDomainFields(node: unknown): unknown[] {\n return typeMembers(node).filter(isRawTimeDomainField);\n}\n\nfunction isOverloadedOptionsParameter(node: unknown): boolean {\n if (!isIdentifier(node)) {\n return false;\n }\n\n return (\n /^(?:opts|options|config)$/i.test(node.name) &&\n isAnyOrObjectTypeAnnotation((node as Node).typeAnnotation)\n );\n}\n\nfunction overloadedOptionsParameters(node: unknown): unknown[] {\n if (typeof node !== \"object\" || node === null || !Array.isArray((node as Node).params)) {\n return [];\n }\n\n return ((node as Node).params as unknown[]).filter(isOverloadedOptionsParameter);\n}\n\nconst comparisonOperators = new Set([\"==\", \"===\", \"!=\", \"!==\", \">\", \">=\", \"<\", \"<=\"]);\n\nfunction comparisonCount(node: unknown, seen = new WeakSet<object>()): number {\n if (Array.isArray(node)) {\n return node.reduce((count, child) => count + comparisonCount(child, seen), 0);\n }\n\n if (typeof node !== \"object\" || node === null) {\n return 0;\n }\n\n if (seen.has(node)) {\n return 0;\n }\n seen.add(node);\n\n const expression = node as Node;\n if (expression.type === \"BinaryExpression\" && comparisonOperators.has(String(expression.operator))) {\n return 1;\n }\n\n if (expression.type !== \"LogicalExpression\") {\n return 0;\n }\n\n return comparisonCount(expression.left, seen) + comparisonCount(expression.right, seen);\n}\n\nfunction isDomainLogicConditional(node: unknown): boolean {\n return (\n typeof node === \"object\" &&\n node !== null &&\n (node as Node).type === \"LogicalExpression\" &&\n comparisonCount(node) >= 3\n );\n}\n\nfunction stateFlagMember(node: unknown): { objectName: string; propertyName: string } | undefined {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"MemberExpression\") {\n return undefined;\n }\n\n const member = node as Node;\n if (member.computed === true || !isIdentifier(member.object) || !isIdentifier(member.property)) {\n return undefined;\n }\n\n const propertyName = member.property.name;\n if (!/(?:cancelled|canceled|shipped|approved|rejected|pending|active|inactive|enabled|disabled|locked|archived|deleted|submitted|processing|failed|complete|completed)$/i.test(propertyName)) {\n return undefined;\n }\n\n return {\n objectName: member.object.name,\n propertyName,\n };\n}\n\nfunction collectStateFlagMembers(\n node: unknown,\n members = new Map<string, Set<string>>(),\n seen = new WeakSet<object>(),\n): Map<string, Set<string>> {\n const member = stateFlagMember(node);\n if (member) {\n const properties = members.get(member.objectName) ?? new Set<string>();\n properties.add(member.propertyName);\n members.set(member.objectName, properties);\n return members;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n collectStateFlagMembers(child, members, seen);\n }\n return members;\n }\n\n if (typeof node !== \"object\" || node === null) {\n return members;\n }\n\n if (seen.has(node)) {\n return members;\n }\n seen.add(node);\n\n const expression = node as Node;\n if (expression.type !== \"LogicalExpression\") {\n return members;\n }\n\n collectStateFlagMembers(expression.left, members, seen);\n collectStateFlagMembers(expression.right, members, seen);\n return members;\n}\n\nfunction isImplicitStateMachineObject(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"LogicalExpression\") {\n return false;\n }\n\n return Array.from(collectStateFlagMembers(node).values()).some((properties) => properties.size >= 2);\n}\n\nfunction isAdhocEffectFail(node: unknown): boolean {\n return isEffectMemberCallNamed(node, \"fail\") && isStringLiteral(firstArgument(node));\n}\n\nfunction isThrowNewStringError(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"ThrowStatement\") {\n return false;\n }\n\n const argument = (node as Node).argument;\n return (\n typeof argument === \"object\" &&\n argument !== null &&\n (argument as Node).type === \"NewExpression\" &&\n isIdentifier((argument as Node).callee, \"Error\") &&\n Array.isArray((argument as Node).arguments) &&\n isStringLiteral(((argument as Node).arguments as unknown[])[0])\n );\n}\n\nfunction hasRawDomainIdParameter(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || !Array.isArray((node as Node).params)) {\n return false;\n }\n\n return ((node as Node).params as unknown[]).some((param) => (\n isIdentifier(param) &&\n /(?:^id$|Id$|ID$)/.test(param.name) &&\n isStringOrNumberTypeAnnotation((param as Node).typeAnnotation)\n ));\n}\n\nfunction isContextEncodedDomainFunction(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"FunctionDeclaration\") {\n return false;\n }\n\n const id = (node as Node).id;\n return (\n isIdentifier(id) &&\n /(?:Admin|Public|Internal|External|Private|Backoffice|Panel)/.test(id.name) &&\n hasRawDomainIdParameter(node)\n );\n}\n\nfunction isStringLiteralComparison(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null || (node as Node).type !== \"BinaryExpression\") {\n return false;\n }\n\n const binary = node as Node;\n return (\n [\"==\", \"===\", \"!=\", \"!==\"].includes(String(binary.operator)) &&\n (isStringLiteral(binary.left) || isStringLiteral(binary.right)) &&\n !isTypeofBooleanCheck(binary)\n );\n}\n\nfunction report(context: OxlintContext, node: unknown, message: string) {\n context.report({ message, node: node as ESTree.Node });\n}\n\nfunction isNullLiteral(node: unknown): boolean {\n if (typeof node !== \"object\" || node === null) {\n return false;\n }\n\n const literal = node as Node;\n return (\n literal.type === \"NullLiteral\" ||\n (literal.type === \"Literal\" && literal.value === null)\n );\n}\n\nfunction getImportSource(node: unknown): string | undefined {\n if (typeof node !== \"object\" || node === null) {\n return undefined;\n }\n\n const source = (node as Node).source;\n if (typeof source === \"string\") {\n return source;\n }\n\n if (typeof source === \"object\" && source !== null) {\n const value = (source as Node).value;\n if (typeof value === \"string\") {\n return value;\n }\n }\n\n return undefined;\n}\n\nfunction isEffectEcosystemImport(source: string): boolean {\n return (\n source === \"effect\" ||\n source.startsWith(\"effect/\") ||\n source === \"@effect-atom/atom-react\"\n );\n}\n\nfunction createEffectGatedStatementRule(\n visitorName: \"IfStatement\" | \"SwitchStatement\" | \"ConditionalExpression\",\n message: string,\n) {\n return defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n [visitorName](node: any) {\n if (hasEffectEcosystemImport) {\n report(context, node, message);\n }\n },\n };\n },\n });\n}\n\nconst reactStateHooks = new Set([\n \"useState\",\n \"useReducer\",\n \"useContext\",\n \"useCallback\",\n \"useEffect\",\n \"useSyncExternalStore\",\n]);\n\nconst noReactState = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n const callee = node.callee;\n const hookName = isIdentifier(callee)\n ? callee.name\n : typeof callee === \"object\" &&\n callee !== null &&\n (callee as Node).type === \"MemberExpression\" &&\n isIdentifier((callee as Node).property)\n ? ((callee as Node).property as { name: string }).name\n : undefined;\n\n if (hookName && reactStateHooks.has(hookName)) {\n report(\n context,\n callee,\n \"Rule: avoid React state hooks. Why: they bypass the atom runtime and break reactive flow. Fix: use @effect-atom/atom-react instead.\",\n );\n }\n },\n };\n },\n});\n\nconst noIfStatement = createEffectGatedStatementRule(\n \"IfStatement\",\n \"Rule: avoid imperative if branching. Why: Effect code should keep branching explicit and typed. Fix: use Match.value/Match.type or Effect combinators instead.\",\n);\n\nconst noSwitchStatement = createEffectGatedStatementRule(\n \"SwitchStatement\",\n \"Rule: avoid imperative switch branching. Why: Effect code should keep branching explicit and typed. Fix: use Match.value/Match.type instead.\",\n);\n\nconst noTernary = createEffectGatedStatementRule(\n \"ConditionalExpression\",\n \"Rule: avoid ternary expressions. Why: they hide control flow inside expressions. Fix: use Option.match/Either.match/Match.value or data combinators, then run one Effect pipeline.\",\n);\n\nconst noReturnNull = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n ReturnStatement(node: any) {\n if (hasEffectEcosystemImport && isNullLiteral(node.argument)) {\n report(\n context,\n node,\n \"Rule: avoid returning null. Why: null is a sentinel that forces defensive guards. Fix: use Option.none for absence or Effect.fail for errors.\",\n );\n }\n },\n };\n },\n});\n\nconst noOptionAs = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isMemberExpression(node.callee, \"Option\", \"as\")) {\n report(\n context,\n node,\n \"Rule: avoid Option.as. Why: it hides selection and encourages placeholder flows. Fix: use Option.map or Option.match and return the value explicitly.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectNever = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n MemberExpression(node: any) {\n if (hasEffectEcosystemImport && isMemberExpression(node, \"Effect\", \"never\")) {\n report(\n context,\n node,\n \"Rule: avoid Effect.never. Why: it hides lifecycle and leaks resources. Fix: use Stream or explicit acquire/release lifecycles with clear teardown.\",\n );\n }\n },\n };\n },\n});\n\nconst noArrowLadder = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport || !isArrowIifeCall(node)) {\n return;\n }\n\n const nested = findArrowIifeCall(node.callee.body);\n if (nested) {\n report(\n context,\n nested,\n \"Rule: avoid nested IIFEs. Why: they hide sequencing and push wrapper hacks. Fix: bind a named context with const and keep one flat pipeline with a single Match/Option decision.\",\n );\n }\n },\n };\n },\n});\n\nconst noBranchInObject = defineRule({\n create(context: OxlintContext) {\n return {\n ObjectExpression(node: any) {\n if (objectPropertyValues(node).some((value) => containsObjectBranchCall(value))) {\n report(\n context,\n node,\n \"Rule: avoid Match/Option/Either inside object literals. Why: it hides the decision and invites workaround scaffolding. Fix: compute the value first (context), then build the object from named values with one flat decision.\",\n );\n }\n },\n };\n },\n});\n\nconst noIifeWrapper = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isInlineFunctionIifeCall(node)) {\n report(\n context,\n node,\n \"Rule: avoid immediate invocation of inline functions. Why: it hides decisions and sequencing. Fix: bind a named context with const and keep one Match/Option decision in a flat pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst noReturnInArrow = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n for (const returnNode of directArrowCallbackReturns(node)) {\n report(\n context,\n returnNode,\n \"Rule: avoid block-bodied arrow callbacks with returns. Why: they hide local control flow. Fix: use expression-only callbacks and move the logic into a single pipeline (pipe/Match/Option/A.map).\",\n );\n }\n },\n };\n },\n});\n\nconst noReturnInCallback = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n for (const returnNode of directFunctionCallbackReturns(node)) {\n report(\n context,\n returnNode,\n \"Rule: avoid returns inside inline callbacks. Why: they hide control flow. Prefer expression-only callbacks, but leaf-level Effect branches with local bindings may use returns when needed.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectFnGenerator = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isEffectGeneratorCall(node, \"fn\")) {\n report(\n context,\n node,\n \"Rule: avoid Effect.fn generator wrappers. Why: they hide sequencing and dodge ladder rules. Fix: keep a single flat pipeline or use one Effect.gen.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectSyncConsole = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (\n hasEffectEcosystemImport &&\n isEffectMemberCallNamed(node, \"sync\") &&\n containsConsoleCall(firstArgument(node))\n ) {\n report(\n context,\n node,\n \"Rule: avoid console.* inside Effect.sync. Why: it hides side effects. Fix: replace with Effect.log* or remove the console call.\",\n );\n }\n },\n };\n },\n});\n\nconst noNestedEffectGen = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n const generator = getEffectGeneratorArgument(node, \"gen\");\n if (!hasEffectEcosystemImport || !generator) {\n return;\n }\n\n const nested = findEffectGenCall(generator.body);\n if (nested) {\n report(\n context,\n nested,\n \"Rule: avoid nested Effect.gen. Why: nested generators hide sequencing. Fix: flatten to a single Effect.gen per method or a single flat pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst noYieldWithoutStarInEffectGen = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n const yieldNode = findYieldWithoutStarInEffectGen(node);\n if (yieldNode) {\n report(\n context,\n yieldNode,\n \"Rule: use yield* inside Effect.gen. Why: plain yield returns an Effect value without delegating to the Effect interpreter. Fix: replace `yield Effect.x` with `yield* Effect.x`.\",\n );\n }\n },\n };\n },\n});\n\nconst noMatchVoidBranch = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isVoidMatchBranch(node)) {\n report(\n context,\n node,\n \"Rule: avoid void Match branches. Why: they hide guard-style control flow. Fix: remove the no-op branch or select a value and run one Effect pipeline outside the Match.\",\n );\n }\n },\n };\n },\n});\n\nconst noMatchEffectBranch = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isMatchValuePipeCall(node) && containsSequencingMatchBranch(node.arguments)) {\n report(\n context,\n node,\n \"Rule: avoid multi-step sequencing inside Match branches. Why: it hides control flow. Fix: select a value in Match, then run one Effect pipeline outside. Avoid data-encoded conditionals (Option.toArray/forEach) that only rewrap the branch.\",\n );\n }\n\n if (isOptionMatchCall(node) && isSequencingBranchBody(node.arguments)) {\n report(\n context,\n node,\n \"Rule: avoid multi-step sequencing inside Option.match branches. Why: it hides control flow. Prefer selecting a value in Option.match, then run one Effect pipeline outside. Leaf-level flows with local bindings may keep Option.match but should stay linear.\",\n );\n }\n },\n };\n },\n});\n\nconst warnEffectSyncWrapper = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n const callback = firstArgument(node);\n const body = arrowCallbackBody(callback);\n if (\n hasEffectEcosystemImport &&\n isEffectMemberCallNamed(node, \"sync\") &&\n isExpressionBodiedArrowCall(callback) &&\n !isConsoleCall(body)\n ) {\n report(\n context,\n node,\n \"Rule: avoid Effect.sync around side effects. Why: it hides intent. Fix: use Effect.log* or an explicit pipeline step for the side effect.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectSideEffectWrapper = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isEffectMemberCallNamed(node, \"as\") && containsWrapperSideEffect(firstArgument(node))) {\n report(\n context,\n node,\n \"Rule: avoid Effect.as for side effects. Why: it hides side effects and turns them into placeholders. Fix: use explicit pipeline steps that return real values with Effect.flatMap, Effect.andThen, or Effect.tap.\",\n );\n }\n\n if (\n isEffectMemberCallNamed(node, \"zipRight\") &&\n containsWrapperSideEffect(firstArgument(node))\n ) {\n report(\n context,\n node,\n \"Rule: avoid Effect.zipRight for side effects. Why: it hides side effects and discards values. Fix: use explicit pipeline steps that return real values with Effect.flatMap, Effect.andThen, or Effect.tap.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectAllStepSequencing = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (\n isEffectMemberCallNamed(node, \"all\") &&\n containsAllStepSideEffect(node.arguments[0]) &&\n hasConcurrencyOne(node.arguments[1])\n ) {\n report(\n context,\n node,\n \"Rule: avoid Effect.all for sequential side-effect steps. Why: it hides imperative sequencing in an array. Fix: use one explicit linear pipeline with Effect.andThen/flatMap and reserve Effect.all for real value aggregation.\",\n );\n }\n\n if (\n isEffectAllAsVoidPipe(node) &&\n containsAllStepSideEffect(firstArgument((node.callee as Node).object as Node & {\n arguments: unknown[];\n }))\n ) {\n report(\n context,\n node,\n \"Rule: avoid Effect.all for sequential side-effect steps. Why: it hides imperative sequencing in an array. Fix: use one explicit linear pipeline with Effect.andThen/flatMap and reserve Effect.all for real value aggregation.\",\n );\n }\n },\n };\n },\n});\n\nconst noAsyncEffectCombinatorCallback = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n const callback = findAsyncEffectCombinatorCallback(node);\n if (callback) {\n report(\n context,\n callback,\n \"Rule: avoid async callbacks in Effect combinators. Why: async callbacks return Promises and bypass Effect failure, interruption, and tracing semantics. Fix: return an Effect and compose with Effect.flatMap/fromPromise at the boundary.\",\n );\n }\n },\n };\n },\n});\n\nconst noThrowInEffectLogic = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n const throwNode = findThrowInEffectLogic(node);\n if (throwNode) {\n report(\n context,\n throwNode,\n \"Rule: avoid throw inside Effect logic. Why: thrown exceptions bypass typed Effect error channels and interruption semantics. Fix: return Effect.fail with a structured tagged error.\",\n );\n }\n },\n };\n },\n});\n\nconst noOrDieOutsideBoundary = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n const target = findEffectOrDieOutsideBoundary(node);\n if (target) {\n report(\n context,\n target,\n \"Rule: avoid Effect.orDie outside runtime boundaries. Why: converting typed failures into defects hides recoverable domain errors. Fix: keep typed errors in domain logic and reserve orDie/orDieWith for explicit application boundaries.\",\n );\n }\n },\n };\n },\n});\n\nconst noSwallowedCatchAll = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n const handlerBody = getSwallowedCatchAllHandler(node);\n if (handlerBody) {\n report(\n context,\n handlerBody,\n \"Rule: avoid swallowing errors in catchAll. Why: succeed/void recovery can hide failures without telemetry or typed recovery. Fix: log, re-fail with a structured error, or recover through an explicit domain branch.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectIgnore = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n const target = findEffectIgnore(node);\n if (target) {\n report(\n context,\n target,\n \"Rule: avoid Effect.ignore. Why: ignoring failable effects hides failure ownership. Fix: handle the error with typed recovery, log and re-fail, or isolate the ignore at an explicit boundary with a documented reason.\",\n );\n }\n },\n };\n },\n});\n\nconst noTryCatchInEffectLogic = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n const tryNode = findTryCatchInEffectLogic(node);\n if (tryNode) {\n report(\n context,\n tryNode,\n \"Rule: avoid try/catch inside Effect logic. Why: it bypasses typed error channels and can miss interruption/cause semantics. Fix: use Effect.try, Effect.catchAll, Effect.catchTag, or typed error combinators.\",\n );\n }\n },\n };\n },\n});\n\nconst noPromiseApiInEffectLogic = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n const promiseNode = findPromiseApiInEffectLogic(node);\n if (promiseNode) {\n report(\n context,\n promiseNode,\n \"Rule: avoid Promise APIs inside Effect logic. Why: Promise APIs bypass Effect scheduling, typed errors, cancellation, and tracing. Fix: use Effect.all, Effect.tryPromise, or move Promise interop to a boundary adapter.\",\n );\n }\n },\n };\n },\n});\n\nconst noTryCatch = defineRule({\n create(context: OxlintContext) {\n return {\n TryStatement(node: any) {\n report(\n context,\n node,\n \"Rule: avoid try/catch in Effect files. Why: it bypasses Effect error channels and reintroduces imperative control flow. Fix: model failures in Effect and handle them with typed errors and Effect combinators.\",\n );\n },\n };\n },\n});\n\nconst noEffectWrapperAlias = defineRule({\n create(context: OxlintContext) {\n return {\n VariableDeclaration(node: any) {\n for (const declaration of node.declarations ?? []) {\n if (isEffectWrapperAliasExpression(declaration.init)) {\n report(\n context,\n node,\n \"Rule: avoid Effect wrapper aliases (`const x = ...Effect...`). Why: it creates wrapper choreography and bloats consts. Fix: inline the pipeline at the call site or define a real domain function that returns data, not an Effect wrapper.\",\n );\n }\n }\n },\n FunctionDeclaration(node: any) {\n if (hasEffectWrapperAliasReturn(node.body)) {\n report(\n context,\n node,\n \"Rule: avoid Effect wrapper aliases (`function x(...) { return Effect... }`). Why: it creates wrapper choreography and bloats consts. Fix: inline the pipeline at the call site or define a real domain function that returns data, not an Effect wrapper.\",\n );\n }\n },\n };\n },\n});\n\nconst noManualEffectChannels = defineRule({\n create(context: OxlintContext) {\n return {\n TSTypeReference(node: any) {\n if (\n isQualifiedTypeReference(node, \"Effect\", \"Effect\") ||\n isQualifiedTypeReference(node, \"Layer\", \"Layer\")\n ) {\n report(\n context,\n node,\n \"Rule: avoid manual Effect channel tuples (`Effect.Effect<...>` / `Layer.Layer<...>`). Why: channels compose through the Effect pipeline and services; hand-written tuples desync from the real flow. Fix: drop the generic and let the return type infer from the Effect/Layer you return, or expose a service method that returns the effect directly.\",\n );\n }\n },\n };\n },\n});\n\nconst noWrapgraphqlCatchall = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n const catchAll = hasEffectEcosystemImport ? getWrapGraphqlCatchAll(node) : undefined;\n if (catchAll) {\n report(\n context,\n catchAll,\n \"Rule: avoid catchAll after wrapGraphqlCall/applyResponse. Why: the envelope already surfaces structured errors. Fix: handle errors in the response mapping instead of catchAll.\",\n );\n }\n },\n };\n },\n});\n\nconst noRenderSideEffects = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n ExpressionStatement(node: any) {\n if (\n hasEffectEcosystemImport &&\n isMatchValuePipeCall(node.expression) &&\n containsMatchBranchCall((node.expression as Node).arguments)\n ) {\n report(\n context,\n node.expression,\n \"Rule: avoid Match.value(...).pipe(...) as a statement. Why: it runs side effects during render. Fix: move the side effect into an Effect runtime action or event handler, and keep Match as a pure expression.\",\n );\n }\n },\n };\n },\n});\n\nconst noAtomRegistryEffectSync = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n const atomOperation = hasEffectEcosystemImport\n ? findAtomOperationInsideEffectSync(node)\n : undefined;\n if (atomOperation) {\n report(\n context,\n atomOperation,\n \"Rule: do not wrap Atom/atomRegistry ops in Effect.sync. Why: it hides side effects and breaks atom flow. Fix: call Atom.get/Atom.set/Atom.update/Atom.modify/Atom.refresh directly.\",\n );\n }\n },\n };\n },\n});\n\nconst noFamilyCollectionRead = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (!isMemberCall(node, \"Atom\", \"family\")) {\n return;\n }\n\n const collectionAtom = findFamilyCollectionRead(node.arguments);\n if (collectionAtom) {\n report(\n context,\n collectionAtom,\n \"Keyed projection atom reads collection atom. Why: Atom.family should project from keyed/source atoms, not broad collection state. Fix: pass the keyed atom into the family or create a keyed source atom before reading.\",\n );\n }\n },\n };\n },\n});\n\nconst noInlineRuntimeProvide = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n const provide = hasEffectEcosystemImport ? findInlineRuntimeProvide(node) : undefined;\n if (provide) {\n report(\n context,\n provide,\n \"Rule: do not inline runtime provisioning inside local helper Effect code. Why: `yield* SomeRuntime.pipe(Effect.provide(SomeRuntimeLive))` and equivalent inline provide chains hide dependency assembly instead of owning it at an Effect.Service boundary or one exported Effect boundary. Fix: declare the live dependency on the owning service or provide it once at the exported boundary, then `yield*` the runtime or service directly inside the body.\",\n );\n }\n },\n };\n },\n});\n\nconst noNakedObjectStateUpdate = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isNakedObjectStateUpdate(node)) {\n report(\n context,\n node,\n \"Rule: avoid naked JS state patching/rebuild and raw JSON shortcuts in Effect transitions. Why: spread/Object.assign/fromEntries and inline JSON parse/stringify hide state intent and bypass explicit model contracts. Fix: use `effect/Record` combinators (`Record.set` / `Record.modify` / `Record.remove`) inside `Struct.evolve`, rebuild with schema constructors (`Schema.make` or field `.make`), and keep serialization at boundaries with schema encode/decode flows. Use `linting.md` guidance when available.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectSucceedVariable = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (\n hasEffectEcosystemImport &&\n isEffectMemberCallNamed(node, \"succeed\") &&\n isEffectSucceedVariableArgument(firstArgument(node))\n ) {\n report(\n context,\n node,\n \"Rule: avoid Effect.succeed(variable) as a branch placeholder. Why: it hides a decision and turns data into pseudo-control flow. Fix: select a plain value (Option/Match) and then run one Effect pipeline after the decision; if you already read the state, return it as a value. Avoid Option.toArray/forEach hacks that just re-encode the branch.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectTypeAlias = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n TSTypeAliasDeclaration(node: any) {\n if (\n hasEffectEcosystemImport &&\n containsQualifiedTypeReference(node.typeAnnotation, \"Effect\", \"Effect\")\n ) {\n report(\n context,\n node.typeAnnotation,\n \"Rule: avoid Effect.Effect type aliases. Why: they hide the service surface and make types opaque. Fix: keep Effect types on service methods or inline at the call site.\",\n );\n }\n },\n };\n },\n});\n\nconst noPublicGenericEffectError = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n ExportNamedDeclaration(node: any) {\n const target = hasEffectEcosystemImport ? exportedGenericEffectErrorTarget(node) : undefined;\n if (target) {\n report(\n context,\n target,\n \"Rule: avoid public Effect APIs with generic Error. Why: public services need recoverable, typed error contracts. Fix: expose tagged domain errors instead of Error.\",\n );\n }\n },\n ExportDefaultDeclaration(node: any) {\n const target = hasEffectEcosystemImport ? exportedGenericEffectErrorTarget(node) : undefined;\n if (target) {\n report(\n context,\n target,\n \"Rule: avoid public Effect APIs with generic Error. Why: public services need recoverable, typed error contracts. Fix: expose tagged domain errors instead of Error.\",\n );\n }\n },\n };\n },\n});\n\nconst noModelOverlayCast = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n VariableDeclaration(node: any) {\n if (hasEffectEcosystemImport && isVariableAsAssertion(node)) {\n report(\n context,\n node,\n \"Rule: avoid `as` assertions on decoded model flow. Why: assertions hide schema drift and allow untyped overlays. Fix: decode with the correct schema type and read fields directly.\",\n );\n }\n },\n };\n },\n});\n\nconst noUnknownBooleanCoercionHelper = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n let hasMatchOrElseNull = false;\n const booleanChecks: unknown[] = [];\n const reported = new WeakSet<object>();\n\n const reportBooleanCheck = (node: unknown) => {\n if (typeof node !== \"object\" || node === null || reported.has(node)) {\n return;\n }\n\n reported.add(node);\n report(\n context,\n node,\n \"Rule: avoid local unknown-to-boolean coercion helpers in services. Why: runtime coercion belongs at schema boundary, not in service flow. Fix: decode boolean optionality in schema and read typed booleans in the Effect pipeline.\",\n );\n };\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n BinaryExpression(node: any) {\n if (!hasEffectEcosystemImport || !isTypeofBooleanCheck(node)) {\n return;\n }\n\n if (hasMatchOrElseNull) {\n reportBooleanCheck(node);\n } else {\n booleanChecks.push(node);\n }\n },\n CallExpression(node: any) {\n if (!hasEffectEcosystemImport || !isMatchOrElseNullCall(node)) {\n return;\n }\n\n hasMatchOrElseNull = true;\n for (const check of booleanChecks) {\n reportBooleanCheck(check);\n }\n },\n };\n },\n});\n\nconst noFromnullableNullishCoalesce = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isOptionFromNullableNullishCoalesce(node)) {\n report(\n context,\n node,\n \"Rule: avoid nullish re-wrap inside Option.fromNullable. Why: `x ?? null` and `x ?? undefined` add noise and hide source shape. Fix: pass the source directly to Option.fromNullable.\",\n );\n }\n },\n };\n },\n});\n\nconst noOptionBooleanNormalization = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isOptionBooleanNormalization(node)) {\n report(\n context,\n node,\n \"Rule: avoid repeated Option boolean normalization (`onSome: value === true, onNone: false`). Why: it scatters coercion rules across services. Fix: normalize once at schema boundary and read booleans directly.\",\n );\n }\n },\n };\n },\n});\n\nconst noStringSentinelReturn = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isEffectMemberCallNamed(node, \"succeed\") && isStringLiteral(firstArgument(node))) {\n report(\n context,\n node,\n \"Rule: avoid returning string tokens. Why: it encodes control flow and forces defensive branching. Fix: return domain values (Option/Either/tagged unions) or real Effect results instead.\",\n );\n }\n },\n };\n },\n});\n\nconst noStringSentinelConst = defineRule({\n create(context: OxlintContext) {\n return {\n VariableDeclaration(node: any) {\n if (isStringSentinelConst(node)) {\n report(\n context,\n node,\n \"Rule: avoid string status constants. Why: they encode control flow and force defensive branching. Fix: use tagged unions, Option/Either, or meaningful domain values instead of string tokens.\",\n );\n }\n },\n };\n },\n});\n\nconst noRawDomainIdAlias = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n TSTypeAliasDeclaration(node: any) {\n if (hasEffectEcosystemImport && isRawDomainIdAlias(node)) {\n report(\n context,\n node,\n \"Rule: avoid raw primitive domain ID aliases. Why: `type UserId = string` does not protect boundaries from swapped IDs. Fix: use Schema branded IDs or a domain constructor that validates and brands the value.\",\n );\n }\n },\n };\n },\n});\n\nconst noBooleanDomainFlag = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n const checkFunctionParameters = (node: unknown) => {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n for (const param of functionBooleanDomainFlagParameters(node)) {\n report(\n context,\n param,\n \"Rule: avoid boolean behavior flags in domain operations. Why: flags like `shouldNotify` hide use cases and create implicit branching. Fix: model intent with a command/tagged union or split the operation into explicit functions.\",\n );\n }\n };\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n FunctionDeclaration: checkFunctionParameters,\n FunctionExpression: checkFunctionParameters,\n ArrowFunctionExpression: checkFunctionParameters,\n };\n },\n});\n\nconst noMagicDomainString = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n BinaryExpression(node: any) {\n if (hasEffectEcosystemImport && isStringLiteralComparison(node)) {\n report(\n context,\n node,\n \"Rule: avoid magic domain string comparisons. Why: comparing domain state to raw strings scatters status vocabulary and misses exhaustiveness. Fix: use a tagged union, Schema literal union, or Match over a named domain status.\",\n );\n }\n },\n };\n },\n});\n\nconst noRawDomainPrimitiveParams = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n const checkFunction = (node: unknown) => {\n if (hasEffectEcosystemImport && hasPrimitiveHeavyDomainParameters(node)) {\n report(\n context,\n node,\n \"Rule: avoid primitive-heavy domain parameters. Why: clusters of raw string/number domain values are easy to swap and have no invariant boundary. Fix: introduce branded types or a command/schema object with named validated fields.\",\n );\n }\n };\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n FunctionDeclaration: checkFunction,\n FunctionExpression: checkFunction,\n ArrowFunctionExpression: checkFunction,\n };\n },\n});\n\nconst noRawTimeDomainField = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n const checkTypeMembers = (node: unknown) => {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n for (const field of rawTimeDomainFields(node)) {\n report(\n context,\n field,\n \"Rule: avoid raw time fields in domain models. Why: number and Date fields hide units, clock ownership, and duration semantics. Fix: model durations with Effect Duration and keep raw timestamps at decode/encode boundaries.\",\n );\n }\n };\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n TSInterfaceDeclaration: checkTypeMembers,\n TSTypeLiteral: checkTypeMembers,\n };\n },\n});\n\nconst noOverloadedOptionsObject = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n const checkFunctionParameters = (node: unknown) => {\n if (!hasEffectEcosystemImport) {\n return;\n }\n\n for (const param of overloadedOptionsParameters(node)) {\n report(\n context,\n param,\n \"Rule: avoid overloaded options objects. Why: `opts`, `options`, and `config` typed as any/object hide required fields and validation. Fix: accept unknown at the boundary and decode with Schema, or use a named typed command/config model.\",\n );\n }\n };\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n FunctionDeclaration: checkFunctionParameters,\n FunctionExpression: checkFunctionParameters,\n ArrowFunctionExpression: checkFunctionParameters,\n };\n },\n});\n\nconst noDomainLogicInConditional = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n LogicalExpression(node: any) {\n if (hasEffectEcosystemImport && isDomainLogicConditional(node)) {\n report(\n context,\n node,\n \"Rule: avoid embedding domain logic in conditionals. Why: multi-clause business rules become hard to test, reuse, and audit. Fix: extract a named domain predicate or validation Effect and call that from the branch.\",\n );\n }\n },\n };\n },\n});\n\nconst noImplicitStateMachineObject = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n LogicalExpression(node: any) {\n if (hasEffectEcosystemImport && isImplicitStateMachineObject(node)) {\n report(\n context,\n node,\n \"Rule: avoid implicit state machines made from boolean flags. Why: multiple flags on one domain object allow impossible states. Fix: model the lifecycle as a tagged union or Data.TaggedEnum.\",\n );\n }\n },\n };\n },\n});\n\nconst noAdhocDomainError = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isAdhocEffectFail(node)) {\n report(\n context,\n node,\n \"Rule: avoid ad hoc domain errors. Why: string failures hide recovery semantics and observability. Fix: use Data.TaggedError or a structured domain error union.\",\n );\n }\n },\n ThrowStatement(node: any) {\n if (hasEffectEcosystemImport && isThrowNewStringError(node)) {\n report(\n context,\n node,\n \"Rule: avoid ad hoc domain errors. Why: thrown string Error values bypass typed Effect error channels. Fix: return Effect.fail with a structured tagged domain error.\",\n );\n }\n },\n };\n },\n});\n\nconst noDomainMeaningByFolderOnly = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n FunctionDeclaration(node: any) {\n if (hasEffectEcosystemImport && isContextEncodedDomainFunction(node)) {\n report(\n context,\n node,\n \"Rule: avoid domain meaning by folder or context naming alone. Why: admin/public/internal meaning should be represented in types or services, not inferred from helper names. Fix: encode context with branded IDs, commands, policies, or service boundaries.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectAs = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isMemberExpression(node.callee, \"Effect\", \"as\")) {\n report(\n context,\n node.callee,\n \"Rule: avoid Effect.as wrappers. Why: they can hide meaningful sequencing or value flow. Fix: return the intended value directly or use explicit Effect.map/andThen.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectDo = defineRule({\n create(context: OxlintContext) {\n return {\n MemberExpression(node: any) {\n if (isMemberExpression(node, \"Effect\", \"Do\")) {\n report(\n context,\n node,\n \"Rule: avoid Effect.Do. Why: it hides sequencing behind builder state. Fix: use Effect.gen or a direct pipe.\",\n );\n }\n },\n };\n },\n});\n\nfunction createForbiddenMemberCallRule(objectName: string, propertyName: string, message: string) {\n return defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isMemberExpression(node.callee, objectName, propertyName)) {\n report(context, node.callee, message);\n }\n },\n };\n },\n });\n}\n\nconst noEffectBind = createForbiddenMemberCallRule(\n \"Effect\",\n \"bind\",\n \"Rule: avoid Effect.bind. Why: it obscures linear data flow behind builder-style binding. Fix: use Effect.gen or a direct pipe with flatMap/map.\",\n);\n\nconst noRuntimeRunFork = createForbiddenMemberCallRule(\n \"Runtime\",\n \"runFork\",\n \"Rule: avoid Runtime.runFork. Why: detached fibers hide lifetime and interruption ownership. Fix: run effects through the application runtime boundary.\",\n);\n\nconst noRunEffectOutsideBoundary = defineRule({\n create(context: OxlintContext) {\n let hasEffectEcosystemImport = false;\n\n return {\n ImportDeclaration(node: any) {\n const source = getImportSource(node);\n if (source && isEffectEcosystemImport(source)) {\n hasEffectEcosystemImport = true;\n }\n },\n CallExpression(node: any) {\n if (hasEffectEcosystemImport && isEffectRunCall(node)) {\n report(\n context,\n node.callee,\n \"Rule: avoid running Effects outside runtime boundaries. Why: direct Effect.run* calls scatter execution ownership. Fix: return Effects from domain logic and run them at the app, CLI, worker, route, or test boundary.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectAsync = createForbiddenMemberCallRule(\n \"Effect\",\n \"async\",\n \"Rule: avoid Effect.async. Why: manual callback bridges are easy to leak or resume incorrectly. Fix: use scoped Effect APIs or a dedicated platform adapter.\",\n);\n\nconst noNestedEffectCall = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (hasDeepNestedEffectFirstArgument(node)) {\n report(\n context,\n node,\n \"Rule: avoid deeply nested Effect calls (Effect.xx(Effect.yy(Effect.zz(...)))). Why: they hide sequencing and spread flow. Fix: build values first, then run one flat Effect pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectLadder = defineRule({\n create(context: OxlintContext) {\n return {\n VariableDeclaration(node: any) {\n for (const declaration of node.declarations ?? []) {\n if (hasDeepNestedEffectFirstArgument(declaration.init)) {\n report(\n context,\n declaration.init,\n \"Rule: avoid nested Effect combinators. Why: they hide sequencing and create laddered control flow. Fix: build context once (Effect.all/Effect.map) and then run a single flat pipeline.\",\n );\n }\n }\n },\n ReturnStatement(node: any) {\n if (hasDeepNestedEffectFirstArgument(node.argument)) {\n report(\n context,\n node.argument,\n \"Rule: avoid nested Effect combinators. Why: they hide sequencing and create laddered control flow. Fix: build context once (Effect.all/Effect.map) and then run a single flat pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst noFlatMapLadder = defineRule({\n create(context: OxlintContext) {\n return {\n VariableDeclaration(node: any) {\n for (const declaration of node.declarations ?? []) {\n const message = getFlatMapLadderMessage(declaration.init);\n if (message) {\n report(context, declaration.init, message);\n }\n }\n },\n ReturnStatement(node: any) {\n const message = getFlatMapLadderMessage(node.argument);\n if (message) {\n report(context, node.argument, message);\n }\n },\n };\n },\n});\n\nconst noPipeLadder = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (isPipeCall(node) && containsPipeCall(node.arguments)) {\n report(\n context,\n node,\n \"Rule: avoid nested pipe() chains. Why: they hide sequencing. Fix: refactor into one flat pipeline with a single decision point.\",\n );\n }\n },\n };\n },\n});\n\nconst noCallTower = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (hasNestedEffectCallArgument(node)) {\n report(\n context,\n node,\n \"Rule: avoid nested Effect call towers (Effect.fn(Effect.fn(...))). Why: it hides sequencing. Fix: build the inner Effect first, then use pipe/Effect.flatMap/Effect.andThen for a single flat pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst noEffectOrElseLadder = defineRule({\n create(context: OxlintContext) {\n return {\n CallExpression(node: any) {\n if (hasOrElseSequencingFirstArgument(node)) {\n report(\n context,\n node,\n \"Rule: avoid Effect.orElse around sequencing chains. Why: it hides error handling and splits the flow. Fix: move error handling to a single terminal decision after the pipeline.\",\n );\n }\n },\n };\n },\n});\n\nconst preventDynamicImports = defineRule({\n create(context: OxlintContext) {\n return {\n ImportExpression(node: any) {\n report(\n context,\n node,\n \"Rule: avoid dynamic imports. Why: runtime module loading obscures dependency boundaries. Fix: use static imports.\",\n );\n },\n };\n },\n});\n\nconst rules = {\n \"no-react-state\": noReactState,\n \"no-if-statement\": noIfStatement,\n \"no-switch-statement\": noSwitchStatement,\n \"no-ternary\": noTernary,\n \"no-return-null\": noReturnNull,\n \"no-option-as\": noOptionAs,\n \"no-effect-never\": noEffectNever,\n \"no-arrow-ladder\": noArrowLadder,\n \"no-branch-in-object\": noBranchInObject,\n \"no-iife-wrapper\": noIifeWrapper,\n \"no-return-in-arrow\": noReturnInArrow,\n \"no-return-in-callback\": noReturnInCallback,\n \"no-effect-fn-generator\": noEffectFnGenerator,\n \"no-effect-sync-console\": noEffectSyncConsole,\n \"no-nested-effect-gen\": noNestedEffectGen,\n \"no-yield-without-star-in-effect-gen\": noYieldWithoutStarInEffectGen,\n \"no-match-void-branch\": noMatchVoidBranch,\n \"no-match-effect-branch\": noMatchEffectBranch,\n \"warn-effect-sync-wrapper\": warnEffectSyncWrapper,\n \"no-effect-side-effect-wrapper\": noEffectSideEffectWrapper,\n \"no-effect-all-step-sequencing\": noEffectAllStepSequencing,\n \"no-async-effect-combinator-callback\": noAsyncEffectCombinatorCallback,\n \"no-throw-in-effect-logic\": noThrowInEffectLogic,\n \"no-or-die-outside-boundary\": noOrDieOutsideBoundary,\n \"no-swallowed-catch-all\": noSwallowedCatchAll,\n \"no-effect-ignore\": noEffectIgnore,\n \"no-try-catch-in-effect-logic\": noTryCatchInEffectLogic,\n \"no-promise-api-in-effect-logic\": noPromiseApiInEffectLogic,\n \"no-try-catch\": noTryCatch,\n \"no-effect-wrapper-alias\": noEffectWrapperAlias,\n \"no-manual-effect-channels\": noManualEffectChannels,\n \"no-wrapgraphql-catchall\": noWrapgraphqlCatchall,\n \"no-render-side-effects\": noRenderSideEffects,\n \"no-atom-registry-effect-sync\": noAtomRegistryEffectSync,\n \"no-family-collection-read\": noFamilyCollectionRead,\n \"no-inline-runtime-provide\": noInlineRuntimeProvide,\n \"no-naked-object-state-update\": noNakedObjectStateUpdate,\n \"no-effect-succeed-variable\": noEffectSucceedVariable,\n \"no-effect-type-alias\": noEffectTypeAlias,\n \"no-public-generic-effect-error\": noPublicGenericEffectError,\n \"no-model-overlay-cast\": noModelOverlayCast,\n \"no-unknown-boolean-coercion-helper\": noUnknownBooleanCoercionHelper,\n \"no-fromnullable-nullish-coalesce\": noFromnullableNullishCoalesce,\n \"no-option-boolean-normalization\": noOptionBooleanNormalization,\n \"no-string-sentinel-return\": noStringSentinelReturn,\n \"no-string-sentinel-const\": noStringSentinelConst,\n \"no-raw-domain-id-alias\": noRawDomainIdAlias,\n \"no-boolean-domain-flag\": noBooleanDomainFlag,\n \"no-magic-domain-string\": noMagicDomainString,\n \"no-raw-domain-primitive-params\": noRawDomainPrimitiveParams,\n \"no-raw-time-domain-field\": noRawTimeDomainField,\n \"no-overloaded-options-object\": noOverloadedOptionsObject,\n \"no-domain-logic-in-conditional\": noDomainLogicInConditional,\n \"no-implicit-state-machine-object\": noImplicitStateMachineObject,\n \"no-adhoc-domain-error\": noAdhocDomainError,\n \"no-domain-meaning-by-folder-only\": noDomainMeaningByFolderOnly,\n \"no-effect-as\": noEffectAs,\n \"no-effect-do\": noEffectDo,\n \"no-effect-bind\": noEffectBind,\n \"no-runtime-runfork\": noRuntimeRunFork,\n \"no-run-effect-outside-boundary\": noRunEffectOutsideBoundary,\n \"no-effect-async\": noEffectAsync,\n \"prevent-dynamic-imports\": preventDynamicImports,\n \"no-nested-effect-call\": noNestedEffectCall,\n \"no-effect-ladder\": noEffectLadder,\n \"no-flatmap-ladder\": noFlatMapLadder,\n \"no-pipe-ladder\": noPipeLadder,\n \"no-call-tower\": noCallTower,\n \"no-effect-orElse-ladder\": noEffectOrElseLadder,\n};\n\nexport const allRules = Object.fromEntries(\n Object.keys(rules).map((ruleName) => [`linteffect/${ruleName}`, \"error\"]),\n) as Record<`linteffect/${string}`, \"error\">;\n\nexport const recommended = {\n jsPlugins: [\n {\n name: \"linteffect\",\n specifier: \"@opsydyn/oxlint-effect\",\n },\n ],\n rules: allRules,\n} as const;\n\nexport default definePlugin({\n meta: {\n name: \"linteffect\",\n },\n rules,\n});\n"],"mappings":";;AAQA,SAAS,aAAa,MAAe,MAAgD;CACnF,OACE,OAAO,SAAS,YAChB,SAAS,QACR,KAAc,SAAS,gBACxB,OAAQ,KAAc,SAAS,aAC9B,SAAS,KAAA,KAAc,KAAc,SAAS;AAEnD;AAEA,SAAS,mBAAmB,MAAe,YAAoB,cAA+B;CAC5F,IAAI,OAAO,SAAS,YAAY,SAAS,MACvC,OAAO;CAGT,MAAM,SAAS;CACf,OACE,OAAO,SAAS,sBAChB,OAAO,aAAa,QACpB,aAAa,OAAO,QAAQ,UAAU,KACtC,aAAa,OAAO,UAAU,YAAY;AAE9C;AAEA,SAAS,mBAAmB,MAAwD;CAClF,IAAI,OAAO,SAAS,YAAY,SAAS,MACvC,OAAO;CAGT,MAAM,OAAO;CACb,OACE,KAAK,SAAS,oBACd,MAAM,QAAQ,KAAK,SAAS,KAC5B,OAAO,KAAK,WAAW,YACvB,KAAK,WAAW,QACf,KAAK,OAAgB,SAAS,sBAC9B,KAAK,OAAgB,aAAa,QACnC,aAAc,KAAK,OAAgB,QAAQ,QAAQ,KACnD,aAAc,KAAK,OAAgB,QAAQ;AAE/C;AAEA,SAAS,cAAc,MAAgD;CACrE,OAAO,KAAK,UAAU;AACxB;AAEA,SAAS,wBACP,MACA,cACyC;CACzC,IAAI,CAAC,mBAAmB,IAAI,GAC1B,OAAO;CAGT,MAAM,SAAS,KAAK;CACpB,OAAO,aAAc,OAAO,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