{"version":3,"file":"no-react19-api.cjs","names":[],"sources":["../../src/rules/no-react19-api.ts"],"sourcesContent":["/* eslint-disable quotes */\nimport type { Rule } from \"eslint\";\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nconst react18APIs = new Set([\n  // React Hooks (stable React 18)\n  \"useState\",\n  \"useEffect\",\n  \"useLayoutEffect\",\n  \"useCallback\",\n  \"useMemo\",\n  \"useRef\",\n  \"useContext\",\n  \"useReducer\",\n  \"useImperativeHandle\",\n  \"useDebugValue\",\n  \"useDeferredValue\",\n  \"useTransition\",\n  \"useId\",\n  \"useSyncExternalStore\",\n  \"useInsertionEffect\",\n\n  // Experimental Hooks in React 18 typings (unstable)\n  \"useOpaqueIdentifier\",\n  \"useEvent\",\n\n  // Core React APIs (functions and components)\n  \"createElement\",\n  \"cloneElement\",\n  \"createContext\",\n  \"isValidElement\",\n  \"forwardRef\",\n  \"memo\",\n  \"lazy\",\n  \"Children\",\n  \"Fragment\",\n  \"StrictMode\",\n  \"Profiler\",\n  \"Suspense\",\n  \"startTransition\",\n  \"flushSync\",\n\n  // React Component Classes & Utilities\n  \"Component\",\n  \"PureComponent\",\n  \"createRef\",\n\n  // React Concurrent APIs (React 18 stable concurrency)\n  \"startTransition\",\n  \"useTransition\",\n  \"useDeferredValue\",\n  \"useId\",\n  \"useSyncExternalStore\",\n  \"flushSync\",\n\n  // React Event system & handler types\n  \"ReactEventHandler\",\n  \"MouseEvent\",\n  \"FormEvent\",\n  \"ChangeEvent\",\n  \"KeyboardEvent\",\n  \"FocusEvent\",\n  \"PointerEvent\",\n  \"TouchEvent\",\n  \"SyntheticEvent\",\n  \"AnimationEvent\",\n  \"ClipboardEvent\",\n  \"CompositionEvent\",\n  \"DragEvent\",\n  \"PointerEventHandler\",\n  \"ReactFocusEventHandler\",\n  \"ReactKeyboardEventHandler\",\n  \"ReactMouseEventHandler\",\n  \"ReactTouchEventHandler\",\n  \"ReactDragEventHandler\",\n  \"ReactPointerEventHandler\",\n\n  // React Types (props, elements, nodes, refs, keys)\n  \"ReactNode\",\n  \"ReactElement\",\n  \"ReactElementLike\",\n  \"ReactNodeLike\",\n  \"ReactFragment\",\n  \"ReactPortal\",\n  \"Key\",\n  \"Ref\",\n  \"RefObject\",\n  \"MutableRefObject\",\n  \"RefCallback\",\n  \"ForwardRefExoticComponent\",\n\n  // React Component Props & typings\n  \"PropsWithChildren\",\n  \"PropsWithRef\",\n  \"PropsWithoutRef\",\n  \"ComponentProps\",\n  \"ComponentPropsWithoutRef\",\n  \"ComponentPropsWithRef\",\n\n  // React Functional Component Types\n  \"Context\",\n  \"ComponentType\",\n  \"FunctionComponent\",\n  \"FC\",\n  \"ReactFC\",\n  \"ReactFunctionComponent\",\n\n  // React JSX & JSX-related types\n  \"JSXElementConstructor\",\n  \"JSXElement\",\n  \"JSXFragment\",\n  \"JSX\",\n  \"JSXNamespace\",\n\n  // React Children utilities & types\n  \"Children\",\n  \"ReactChild\",\n  \"ReactChildren\",\n  \"ReactNodeArray\",\n\n  // React Utilities & internal types\n  \"ExoticComponent\",\n  \"MemoExoticComponent\",\n  \"NamedExoticComponent\",\n  \"ReactMemo\",\n  \"ReactLazyExoticComponent\",\n  \"ReactDebugCurrentFrame\",\n  \"isValidElementType\",\n  \"lazyInitializer\",\n\n  // React Profiler API\n  \"Profiler\",\n  \"ProfilerOnRenderCallback\",\n\n  // React Suspense List API (unstable but shipped in React 18)\n  \"SuspenseProps\",\n  \"SuspenseList\",\n  \"SuspenseListComponent\",\n  \"unstable_SuspenseList\",\n\n  // React Server Components (experimental but shipped in React 18)\n  \"ServerContext\",\n  \"createServerContext\",\n  \"ServerComponent\",\n  \"ClientComponent\",\n  \"ServerProps\",\n  \"ClientProps\",\n  \"ReactFlightClientConfig\",\n\n  // React Ref related types for prop forwarding & attributes\n  \"RefAttributes\",\n  \"EffectCallback\",\n\n  // React Dispatch & StateUpdater types\n  \"Dispatch\",\n  \"SetStateAction\",\n\n  // React Internal types & utilities (from typings)\n  \"ReactPortalType\",\n  \"ReactScope\",\n  \"ReactScopeType\",\n  \"ReactProviderType\",\n  \"ReactProvider\",\n  \"ReactContext\",\n  \"ReactContextType\",\n  \"ReactContextConsumer\",\n  \"ReactContextProvider\",\n\n  // Experimental React 18 types (shipped in typings)\n  \"OffscreenProps\",\n  \"OffscreenComponent\",\n  \"OffscreenMode\",\n  \"OffscreenType\",\n\n  // React Cache (experimental)\n  \"CacheContext\",\n  \"CacheProvider\",\n\n  // JSX Runtime (new JSX transform helpers)\n  \"jsx\",\n  \"jsxs\",\n  \"jsxDEV\",\n  \"Fragment as jsxFragment\",\n\n  // React Legacy Context API (rarely used but still present)\n  \"unstable_DebugTracingMode\",\n  \"unstable_LegacyRoot\",\n  \"unstable_ConcurrentMode\",\n\n  // Experimental tracing API\n  \"unstable_trace\",\n\n  // HTML & SVG intrinsic element props types (from @types/react)\n  \"HTMLAttributes\",\n  \"DetailedHTMLProps\",\n  \"AnchorHTMLAttributes\",\n  \"AudioHTMLAttributes\",\n  \"AreaHTMLAttributes\",\n  \"BaseHTMLAttributes\",\n  \"BlockquoteHTMLAttributes\",\n  \"ButtonHTMLAttributes\",\n  \"CanvasHTMLAttributes\",\n  \"ColHTMLAttributes\",\n  \"EmbedHTMLAttributes\",\n  \"FormHTMLAttributes\",\n  \"IframeHTMLAttributes\",\n  \"ImgHTMLAttributes\",\n  \"InputHTMLAttributes\",\n  \"KeygenHTMLAttributes\",\n  \"LabelHTMLAttributes\",\n  \"LiHTMLAttributes\",\n  \"LinkHTMLAttributes\",\n  \"MapHTMLAttributes\",\n  \"MenuHTMLAttributes\",\n  \"MediaHTMLAttributes\",\n  \"MetaHTMLAttributes\",\n  \"MeterHTMLAttributes\",\n  \"QuoteHTMLAttributes\",\n  \"ObjectHTMLAttributes\",\n  \"OlHTMLAttributes\",\n  \"OptgroupHTMLAttributes\",\n  \"OptionHTMLAttributes\",\n  \"OutputHTMLAttributes\",\n  \"ParamHTMLAttributes\",\n  \"ProgressHTMLAttributes\",\n  \"ScriptHTMLAttributes\",\n  \"SelectHTMLAttributes\",\n  \"SourceHTMLAttributes\",\n  \"StyleHTMLAttributes\",\n  \"TableHTMLAttributes\",\n  \"TextAreaHTMLAttributes\",\n  \"TdHTMLAttributes\",\n  \"ThHTMLAttributes\",\n  \"TimeHTMLAttributes\",\n  \"TrackHTMLAttributes\",\n  \"VideoHTMLAttributes\",\n  \"WebViewHTMLAttributes\",\n  \"CSSProperties\",\n\n  // SVG attributes\n  \"SVGAttributes\",\n  \"CircleSVGAttributes\",\n  \"EllipseSVGAttributes\",\n  \"ForeignObjectSVGAttributes\",\n  \"GSVGAttributes\",\n  \"ImageSVGAttributes\",\n  \"LineSVGAttributes\",\n  \"LinearGradientSVGAttributes\",\n  \"MarkerSVGAttributes\",\n  \"MaskSVGAttributes\",\n  \"PathSVGAttributes\",\n  \"PatternSVGAttributes\",\n  \"PolygonSVGAttributes\",\n  \"PolylineSVGAttributes\",\n  \"RadialGradientSVGAttributes\",\n  \"RectSVGAttributes\",\n  \"StopSVGAttributes\",\n  \"SvgSVGAttributes\",\n  \"TextSVGAttributes\",\n  \"TSpanSVGAttributes\"\n]);\n\nfunction typeNodeLooksLikeWithRef(typeNode?: TSESTree.TypeNode) {\n  if (!typeNode) return false;\n  if (typeNode.type === \"TSTypeReference\") {\n    const tn = typeNode.typeName;\n    if (tn.type === \"Identifier\") {\n      const n = tn.name;\n      return (\n        n.includes(\"WithRef\") ||\n        n.includes(\"PropsWithRef\") ||\n        n.includes(\"ComponentPropsWithRef\") ||\n        n.toLowerCase().includes(\"ref\")\n      );\n    } else if (tn.type === \"TSQualifiedName\") {\n      const right = tn.right;\n      const n = right?.name;\n      return (\n        n?.includes?.(\"WithRef\") ||\n        n?.includes?.(\"PropsWithRef\") ||\n        n?.includes?.(\"ComponentPropsWithRef\") ||\n        n?.toLowerCase?.().includes(\"ref\")\n      );\n    }\n  }\n  if (\n    typeNode.type === \"TSUnionType\" ||\n    typeNode.type === \"TSIntersectionType\"\n  ) {\n    return typeNode.types.some(typeNodeLooksLikeWithRef);\n  }\n  if (typeNode.type === \"TSTypeLiteral\") {\n    return typeNode.members.some(\n      (m) =>\n        m.type === \"TSPropertySignature\" &&\n        (m.key as { name?: string })?.name === \"ref\"\n    );\n  }\n  return false;\n}\n\nfunction isInImportDeclaration(node: TSESTree.Node) {\n  let cur: TSESTree.Node | undefined = node;\n  while (cur) {\n    if (cur.type === \"ImportDeclaration\") return true;\n    cur = cur.parent;\n  }\n  return false;\n}\n\ntype PartialIdentifier = Partial<TSESTree.Identifier>;\n\nconst noReact19ApiRule: Rule.RuleModule = {\n  meta: {\n    type: \"problem\",\n    docs: {\n      description:\n        \"Disallow React 19 APIs and disallow passing/receiving ref on components not using forwardRef\",\n      recommended: true\n    },\n    messages: {\n      forbiddenApi:\n        'Usage of React 19 API \"{{name}}\" is strictly prohibited to maintain backward compatibility and prevent potential runtime issues in React 18 environments.',\n      forbiddenComponentRef:\n        'Component \"{{name}}\" forwards or receives a ref without being wrapped in `React.forwardRef`, violating React 18’s ref forwarding contract and potentially causing unexpected behavior.'\n    },\n    schema: undefined\n  },\n\n  create(context) {\n    const forwardRefComponents = new Set();\n    const componentStack: Array<{\n      name: string;\n      node: TSESTree.Node;\n      hasRef: boolean;\n      maybeHasRefFromType: boolean;\n    }> = [];\n\n    const reportedImportNames = new Set();\n    const reportedApiNodes = new WeakSet<TSESTree.Node>();\n\n    // Track React aliases and named imports\n    const reactAliases = new Set(); // e.g. React, R, etc\n    const reactNamedImports = new Set(); // e.g. useState, useEffect, etc\n\n    const markRef = () => {\n      const c = componentStack.at(-1);\n      if (c) c.hasRef = true;\n    };\n\n    const enterComponent = (\n      name: string | null | undefined,\n      node: TSESTree.Node\n    ) => {\n      if (!name || !/^[A-Z]/.test(name)) return;\n      const info = {\n        name,\n        node,\n        hasRef: false,\n        maybeHasRefFromType: false\n      };\n\n      const fn = node.type === \"VariableDeclarator\" ? node.init : node;\n      const firstParam = (fn as Partial<TSESTree.FunctionDeclaration>)\n        ?.params?.[0];\n      if (firstParam) {\n        if (firstParam.type === \"Identifier\" && firstParam.typeAnnotation) {\n          const ta = firstParam.typeAnnotation.typeAnnotation;\n          if (typeNodeLooksLikeWithRef(ta)) info.maybeHasRefFromType = true;\n        }\n        if (firstParam.type === \"ObjectPattern\" && firstParam.typeAnnotation) {\n          const ta = firstParam.typeAnnotation.typeAnnotation;\n          if (typeNodeLooksLikeWithRef(ta)) info.maybeHasRefFromType = true;\n          for (const prop of firstParam.properties) {\n            if (\n              ((prop as TSESTree.Property).key as PartialIdentifier)?.name ===\n              \"ref\"\n            )\n              info.hasRef = true;\n          }\n        }\n      }\n      componentStack.push(info);\n    };\n\n    const exitComponent = () => {\n      const comp = componentStack.pop();\n      if (!comp) return;\n      if (comp.hasRef && !forwardRefComponents.has(comp.name)) {\n        context.report({\n          node: comp.node,\n          messageId: \"forbiddenComponentRef\",\n          data: { name: comp.name }\n        });\n      }\n    };\n\n    return {\n      ImportDeclaration(node: TSESTree.ImportDeclaration) {\n        if (node.source.value === \"react\") {\n          for (const specifier of node.specifiers) {\n            if (specifier.type === \"ImportNamespaceSpecifier\") {\n              reactAliases.add(specifier.local.name);\n            } else if (specifier.type === \"ImportDefaultSpecifier\") {\n              reactAliases.add(specifier.local.name);\n            } else if (specifier.type === \"ImportSpecifier\") {\n              reactNamedImports.add(specifier.local.name);\n            }\n          }\n        }\n      },\n\n      VariableDeclarator(node: TSESTree.VariableDeclarator) {\n        if (\n          node.init?.type === \"CallExpression\" &&\n          (node.init.callee as PartialIdentifier)?.name === \"forwardRef\" &&\n          node.id.type === \"Identifier\"\n        ) {\n          forwardRefComponents.add(node.id.name);\n        }\n      },\n\n      FunctionDeclaration(node: TSESTree.FunctionDeclaration) {\n        if (node.id) enterComponent(node.id.name, node);\n      },\n      FunctionExpression(node: TSESTree.FunctionExpression) {\n        const parent = node.parent;\n        if (parent.type === \"VariableDeclarator\")\n          enterComponent((parent.id as { name?: string | null })?.name, parent);\n      },\n      ArrowFunctionExpression(node: TSESTree.ArrowFunctionExpression) {\n        const parent = node.parent;\n        if (parent.type === \"VariableDeclarator\")\n          enterComponent((parent.id as PartialIdentifier)?.name, parent);\n      },\n\n      MemberExpression(node: TSESTree.MemberExpression) {\n        // For ref usage detection on props\n        if ((node.property as PartialIdentifier)?.name === \"ref\") markRef();\n\n        // For React namespace usage like React.useEffectEvent\n        if (\n          node.object.type === \"Identifier\" &&\n          reactAliases.has(node.object.name) &&\n          node.property.type === \"Identifier\"\n        ) {\n          const apiName = node.property.name;\n          if (!react18APIs.has(apiName) && !reportedApiNodes.has(node)) {\n            reportedApiNodes.add(node);\n            context.report({\n              node,\n              messageId: \"forbiddenApi\",\n              data: { name: `${node.object.name}.${apiName}` }\n            });\n          }\n        }\n      },\n\n      Property(node: TSESTree.Property) {\n        const isParamDestructure =\n          node.parent?.type === \"ObjectPattern\" &&\n          [\n            \"FunctionDeclaration\",\n            \"FunctionExpression\",\n            \"ArrowFunctionExpression\"\n          ].includes(node.parent.parent?.type);\n        if (isParamDestructure) return;\n        if ((node.key as PartialIdentifier)?.name === \"ref\") markRef();\n      },\n\n      JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n        const current = componentStack.at(-1);\n        if (!current) return;\n        if (\n          node.name.type === \"JSXIdentifier\" &&\n          /^[a-z]/.test(node.name.name)\n        ) {\n          return;\n        }\n        for (const attr of node.attributes) {\n          if (attr.type === \"JSXAttribute\" && attr.name.name === \"ref\") {\n            markRef();\n            return;\n          }\n        }\n        for (const attr of node.attributes) {\n          if (attr.type === \"JSXSpreadAttribute\") {\n            const arg = attr.argument;\n            if (arg.type === \"ObjectExpression\") {\n              for (const p of arg.properties) {\n                if (\n                  p.type === \"Property\" &&\n                  (p.key as PartialIdentifier)?.name === \"ref\"\n                ) {\n                  markRef();\n                  return;\n                }\n              }\n            }\n            if (\n              arg.type === \"Identifier\" &&\n              arg.name === \"props\" &&\n              current.maybeHasRefFromType\n            ) {\n              markRef();\n              return;\n            }\n          }\n        }\n      },\n\n      \"FunctionDeclaration:exit\": exitComponent,\n      \"FunctionExpression:exit\": exitComponent,\n      \"ArrowFunctionExpression:exit\": exitComponent,\n\n      ImportSpecifier(node: TSESTree.ImportSpecifier) {\n        // ImportSpecifier must be check, if import from react\n        const importDecl = node.parent;\n        if (\n          importDecl &&\n          importDecl.type === \"ImportDeclaration\" &&\n          importDecl.source.value === \"react\"\n        ) {\n          const name = (node.imported as PartialIdentifier)?.name;\n          if (\n            name &&\n            !react18APIs.has(name) &&\n            !reportedImportNames.has(name)\n          ) {\n            reportedImportNames.add(name);\n            context.report({\n              node,\n              messageId: \"forbiddenApi\",\n              data: { name: (node.imported as PartialIdentifier)?.name }\n            });\n          }\n        }\n      },\n\n      Identifier(node: TSESTree.Node) {\n        // Skip if this identifier is part of a MemberExpression property that was already reported\n        if (\n          node.parent?.type === \"MemberExpression\" &&\n          node.parent.property === node &&\n          reportedApiNodes.has(node.parent)\n        ) {\n          return;\n        }\n\n        const name = (node as PartialIdentifier).name;\n        // Just check the identifiers in reactNamedImports (named imports from react)\n        if (\n          reactNamedImports.has(name) &&\n          name &&\n          !react18APIs.has(name) &&\n          // !reportedUsageNames.has(name) &&\n          !isInImportDeclaration(node) &&\n          !reportedApiNodes.has(node)\n        ) {\n          reportedApiNodes.add(node);\n          // reportedUsageNames.add(name);\n          context.report({\n            node,\n            messageId: \"forbiddenApi\",\n            data: { name: name }\n          });\n        }\n      }\n    } as unknown as Rule.RuleListener;\n  }\n};\n\nexport default noReact19ApiRule;\n"],"mappings":";;;;;;;;;;AAIA,MAAM,EAAc,IAAI,IAAI,2xGAgQ5B,CAAC,EAED,SAAS,EAAyB,EAA8B,CAC9D,GAAI,CAAC,EAAU,MAAO,GACtB,GAAI,EAAS,OAAS,kBAAmB,CACvC,IAAM,EAAK,EAAS,SACpB,GAAI,EAAG,OAAS,aAAc,CAC5B,IAAM,EAAI,EAAG,KACb,OACE,EAAE,SAAS,SAAS,GACpB,EAAE,SAAS,cAAc,GACzB,EAAE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