|
14 | 14 |
|
15 | 15 | | Interface | Description | |
16 | 16 | | ------ | ------ | |
17 | | -| [ClassComponentSemanticNode](interfaces/ClassComponentSemanticNode.md) | Represents a React class component | |
18 | | -| [ClientFunctionSemanticNode](interfaces/ClientFunctionSemanticNode.md) | Represents a React function | |
19 | | -| [FunctionComponentSemanticNode](interfaces/FunctionComponentSemanticNode.md) | Represents a React function component | |
| 17 | +| [ClassComponentSemanticNode](interfaces/ClassComponentSemanticNode.md) | Represents a React Class Component | |
| 18 | +| [ClientFunctionSemanticNode](interfaces/ClientFunctionSemanticNode.md) | Represents a React Client Function | |
| 19 | +| [FunctionComponentSemanticNode](interfaces/FunctionComponentSemanticNode.md) | Represents a React Function Component | |
20 | 20 | | [HookSemanticNode](interfaces/HookSemanticNode.md) | - | |
21 | 21 | | [JsxConfig](interfaces/JsxConfig.md) | - | |
22 | 22 | | [SemanticFunc](interfaces/SemanticFunc.md) | - | |
23 | 23 | | [SemanticNode](interfaces/SemanticNode.md) | - | |
24 | | -| [ServerFunctionSemanticNode](interfaces/ServerFunctionSemanticNode.md) | - | |
| 24 | +| [ServerFunctionSemanticNode](interfaces/ServerFunctionSemanticNode.md) | Represents a React Server Function | |
25 | 25 |
|
26 | 26 | ## Type Aliases |
27 | 27 |
|
|
30 | 30 | | [ComponentDetectionHint](type-aliases/ComponentDetectionHint.md) | - | |
31 | 31 | | [ComponentEffectPhaseKind](type-aliases/ComponentEffectPhaseKind.md) | - | |
32 | 32 | | [ComponentFlag](type-aliases/ComponentFlag.md) | - | |
33 | | -| [ComponentKind](type-aliases/ComponentKind.md) | - | |
| 33 | +| [ComponentKind](type-aliases/ComponentKind.md) | Represents the kind of a React component | |
34 | 34 | | [ComponentLifecyclePhaseKind](type-aliases/ComponentLifecyclePhaseKind.md) | - | |
35 | 35 | | [ComponentPhaseKind](type-aliases/ComponentPhaseKind.md) | - | |
36 | | -| [ComponentSemanticNode](type-aliases/ComponentSemanticNode.md) | Union type representing either a class or function component | |
| 36 | +| [ComponentSemanticNode](type-aliases/ComponentSemanticNode.md) | Represents a React Component | |
37 | 37 | | [FindEnclosingComponentOrHookFilter](type-aliases/FindEnclosingComponentOrHookFilter.md) | - | |
38 | | -| [FunctionSemanticNode](type-aliases/FunctionSemanticNode.md) | - | |
| 38 | +| [FunctionSemanticNode](type-aliases/FunctionSemanticNode.md) | Represents a React Function | |
39 | 39 | | [JsxAttributeValue](type-aliases/JsxAttributeValue.md) | Represents possible JSX attribute value types that can be resolved | |
40 | 40 | | [JsxDetectionHint](type-aliases/JsxDetectionHint.md) | BitFlags for configuring JSX detection behavior | |
41 | 41 |
|
|
44 | 44 | | Variable | Description | |
45 | 45 | | ------ | ------ | |
46 | 46 | | [ComponentDetectionHint](variables/ComponentDetectionHint.md) | Hints for component collector | |
47 | | -| [ComponentFlag](variables/ComponentFlag.md) | - | |
| 47 | +| [ComponentFlag](variables/ComponentFlag.md) | Component flag constants | |
48 | 48 | | [ComponentPhaseRelevance](variables/ComponentPhaseRelevance.md) | - | |
49 | 49 | | [DEFAULT\_COMPONENT\_DETECTION\_HINT](variables/DEFAULT_COMPONENT_DETECTION_HINT.md) | Default component detection hint | |
50 | 50 | | [DEFAULT\_JSX\_DETECTION\_HINT](variables/DEFAULT_JSX_DETECTION_HINT.md) | Default JSX detection configuration Skips undefined and boolean literals (common in React) | |
|
122 | 122 | | ------ | ------ | |
123 | 123 | | [findEnclosingComponentOrHook](functions/findEnclosingComponentOrHook.md) | Find the enclosing React component or hook for a given AST node | |
124 | 124 | | [findParentJsxAttribute](functions/findParentJsxAttribute.md) | Traverses up the AST to find a parent JSX attribute node that matches a given test | |
125 | | -| [getComponentFlagFromInitPath](functions/getComponentFlagFromInitPath.md) | - | |
126 | | -| [getFunctionComponentId](functions/getFunctionComponentId.md) | - | |
| 125 | +| [getComponentFlagFromInitPath](functions/getComponentFlagFromInitPath.md) | Get component flag from init path | |
| 126 | +| [getFunctionComponentId](functions/getFunctionComponentId.md) | Get function component identifier from `const Component = memo(() => {});` | |
127 | 127 | | [getJsxAttribute](functions/getJsxAttribute.md) | Creates a helper function to find a specific JSX attribute by name Handles direct attributes and spread attributes (variables or object literals) | |
128 | 128 | | [getJsxAttributeName](functions/getJsxAttributeName.md) | Get the stringified name of a JSX attribute | |
129 | 129 | | [getJsxConfigFromAnnotation](functions/getJsxConfigFromAnnotation.md) | Get JsxConfig from pragma comments (annotations) in the source code | |
|
132 | 132 | | [getPhaseKindOfFunction](functions/getPhaseKindOfFunction.md) | - | |
133 | 133 | | [hasNoneOrLooseComponentName](functions/hasNoneOrLooseComponentName.md) | Check if the function has no name or a loose component name | |
134 | 134 | | [isClassComponent](functions/isClassComponent.md) | Check if a node is a React class component | |
135 | | -| [isComponentDefinition](functions/isComponentDefinition.md) | Determines if a function node represents a valid React component definition | |
136 | | -| [isComponentDidMountCallback](functions/isComponentDidMountCallback.md) | Checks if the node is a function of `componentDidMount` | |
| 135 | +| [isComponentDefinition](functions/isComponentDefinition.md) | Determine if a function node represents a valid React component definition | |
| 136 | +| [isComponentDidMountCallback](functions/isComponentDidMountCallback.md) | Check if the given node is a componentDidMount callback | |
137 | 137 | | [isComponentName](functions/isComponentName.md) | Check if a string matches the strict component name pattern | |
138 | 138 | | [isComponentNameLoose](functions/isComponentNameLoose.md) | Check if a string matches the loose component name pattern | |
139 | | -| [isComponentWillUnmountCallback](functions/isComponentWillUnmountCallback.md) | Checks if the node is a function of `componentWillUnmount` | |
| 139 | +| [isComponentWillUnmountCallback](functions/isComponentWillUnmountCallback.md) | Check if the given node is a componentWillUnmount callback | |
140 | 140 | | [isComponentWrapperCall](functions/isComponentWrapperCall.md) | Check if the node is a call expression for a component wrapper | |
141 | 141 | | [isComponentWrapperCallback](functions/isComponentWrapperCallback.md) | Check if the node is a callback function passed to a component wrapper | |
142 | 142 | | [isComponentWrapperCallbackLoose](functions/isComponentWrapperCallbackLoose.md) | Check if the node is a callback function passed to a component wrapper loosely | |
143 | 143 | | [isComponentWrapperCallLoose](functions/isComponentWrapperCallLoose.md) | Check if the node is a call expression for a component wrapper loosely | |
144 | 144 | | [isDeclaredInRenderPropLoose](functions/isDeclaredInRenderPropLoose.md) | Unsafe check whether given node is declared inside a render prop `_ = <Component renderRow={"node"} /> ` ^^^^^^ ` _ = <Component rows={ [{ render: "node" }] } /> ` ^^^^^^ `` | |
145 | | -| [isHook](functions/isHook.md) | Determines if a function node is a React Hook based on its name. | |
| 145 | +| [isHook](functions/isHook.md) | Determine if a function node is a React Hook based on its name. | |
146 | 146 | | [isHookCall](functions/isHookCall.md) | Check if the given node is a React Hook call by its name. | |
147 | | -| [isHookCallWithName](functions/isHookCallWithName.md) | Checks if a node is a call to a specific React hook. Returns a function that accepts a hook name to check against. | |
| 147 | +| [isHookCallWithName](functions/isHookCallWithName.md) | Check if a node is a call to a specific React hook. Returns a function that accepts a hook name to check against. | |
148 | 148 | | [isHookId](functions/isHookId.md) | - | |
149 | 149 | | [isHookName](functions/isHookName.md) | Catch all identifiers that begin with "use" followed by an uppercase Latin character to exclude identifiers like "user". | |
150 | | -| [isInitializedFromReact](functions/isInitializedFromReact.md) | Checks if a variable is initialized or derived from React import | |
151 | | -| [isInitializedFromReactNative](functions/isInitializedFromReactNative.md) | Checks if a variable is initialized from React Native import | |
152 | | -| [isInitializedFromRef](functions/isInitializedFromRef.md) | Checks if the variable with the given name is initialized or derived from a ref | |
153 | | -| [isInsideComponentOrHook](functions/isInsideComponentOrHook.md) | Checks if a given AST node is inside a React component or hook | |
154 | | -| [isJsxFragmentElement](functions/isJsxFragmentElement.md) | Determines if a JSX element is a React Fragment Fragments can be imported from React and used like <Fragment> or <React.Fragment> | |
155 | | -| [isJsxHostElement](functions/isJsxHostElement.md) | Determines if a JSX element is a host element Host elements in React start with lowercase letters (e.g., div, span) | |
156 | | -| [isJsxLike](functions/isJsxLike.md) | Determines if a node represents JSX-like content based on heuristics Supports configuration through hint flags to customize detection behavior | |
157 | | -| [isJsxText](functions/isJsxText.md) | Checks if a node is a `JSXText` or a `Literal` node | |
| 150 | +| [isInitializedFromReact](functions/isInitializedFromReact.md) | Check if a variable is initialized from React import | |
| 151 | +| [isInitializedFromReactNative](functions/isInitializedFromReactNative.md) | if a variable is initialized from React Native import | |
| 152 | +| [isInitializedFromRef](functions/isInitializedFromRef.md) | Check if the variable with the given name is initialized or derived from a ref | |
| 153 | +| [isInsideComponentOrHook](functions/isInsideComponentOrHook.md) | Check if a given AST node is inside a React component or hook | |
| 154 | +| [isJsxFragmentElement](functions/isJsxFragmentElement.md) | Determine if a JSX element is a React Fragment Fragments can be imported from React and used like <Fragment> or <React.Fragment> | |
| 155 | +| [isJsxHostElement](functions/isJsxHostElement.md) | Determine if a JSX element is a host element Host elements in React start with lowercase letters (e.g., div, span) | |
| 156 | +| [isJsxLike](functions/isJsxLike.md) | Determine if a node represents JSX-like content based on heuristics Supports configuration through hint flags to customize detection behavior | |
| 157 | +| [isJsxText](functions/isJsxText.md) | Check if a node is a `JSXText` or a `Literal` node | |
158 | 158 | | [isPureComponent](functions/isPureComponent.md) | Check if a node is a React PureComponent | |
159 | | -| [isReactAPI](functions/isReactAPI.md) | Checks if the node is a React API identifier or member expression | |
160 | | -| [isReactAPICall](functions/isReactAPICall.md) | Checks if the node is a call expression to a specific React API | |
161 | | -| [isRefName](functions/isRefName.md) | Checks if a given name corresponds to a ref name | |
| 159 | +| [isReactAPI](functions/isReactAPI.md) | Check if the node is a React API identifier or member expression | |
| 160 | +| [isReactAPICall](functions/isReactAPICall.md) | Check if the node is a call expression to a specific React API | |
| 161 | +| [isRefName](functions/isRefName.md) | Check if a given name corresponds to a ref name | |
162 | 162 | | [isRenderFunctionLoose](functions/isRenderFunctionLoose.md) | Unsafe check whether given node is a render function `const renderRow = () => <div /> ` ^^^^^^^^^^^^` _ = <Component renderRow={() => <div />} /> ` ^^^^^^^^^^^^^ `` | |
163 | 163 | | [isRenderMethodLike](functions/isRenderMethodLike.md) | Check whether given node is a render method of a class component | |
164 | 164 | | [isRenderPropLoose](functions/isRenderPropLoose.md) | Unsafe check whether given JSXAttribute is a render prop `_ = <Component renderRow={() => <div />} /> ` ^^^^^^^^^^^^^^^^^^^^^^^^^ `` | |
165 | | -| [isUseEffectCleanupCallback](functions/isUseEffectCleanupCallback.md) | Determines if a node is the cleanup function returned by a useEffect-like hook's setup function. | |
166 | | -| [isUseEffectLikeCall](functions/isUseEffectLikeCall.md) | Detects useEffect calls and variations (useLayoutEffect, etc.) using regex pattern. | |
167 | | -| [isUseEffectSetupCallback](functions/isUseEffectSetupCallback.md) | Determines if a node is the setup function passed to a useEffect-like hook | |
168 | | -| [isUseStateLikeCall](functions/isUseStateLikeCall.md) | Detects useState calls and variations (useCustomState, etc.) using regex pattern. | |
169 | | -| [resolveJsxAttributeValue](functions/resolveJsxAttributeValue.md) | Resolves the static value of a JSX attribute or spread attribute | |
| 165 | +| [isUseEffectCleanupCallback](functions/isUseEffectCleanupCallback.md) | Determine if a node is the cleanup function returned by a useEffect-like hook's setup function. | |
| 166 | +| [isUseEffectLikeCall](functions/isUseEffectLikeCall.md) | Detect useEffect calls and variations (useLayoutEffect, etc.) using a regex pattern | |
| 167 | +| [isUseEffectSetupCallback](functions/isUseEffectSetupCallback.md) | Determine if a node is the setup function passed to a useEffect-like hook | |
| 168 | +| [isUseStateLikeCall](functions/isUseStateLikeCall.md) | Detect useState calls and variations (useCustomState, etc.) using a regex pattern | |
| 169 | +| [resolveJsxAttributeValue](functions/resolveJsxAttributeValue.md) | Resolve the static value of a JSX attribute or spread attribute | |
170 | 170 | | [stringifyJsx](functions/stringifyJsx.md) | Incomplete but sufficient stringification of JSX nodes for common use cases | |
171 | | -| [useComponentCollector](functions/useComponentCollector.md) | Get a ctx and visitor for the rule to collect function components | |
172 | | -| [useComponentCollectorLegacy](functions/useComponentCollectorLegacy.md) | Get a ctx and visitor object for the rule to collect class components | |
173 | | -| [useHookCollector](functions/useHookCollector.md) | Get a ctx and visitor for the rule to collect hooks | |
| 171 | +| [useComponentCollector](functions/useComponentCollector.md) | Get a ctx and visitor object for the rule to collect function components | |
| 172 | +| [useComponentCollectorLegacy](functions/useComponentCollectorLegacy.md) | Get a ctx and visitor object for the rule to collect class componentss | |
| 173 | +| [useHookCollector](functions/useHookCollector.md) | Get a ctx and visitor object for the rule to collect hooks | |
0 commit comments