Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 468 Bytes

File metadata and controls

21 lines (13 loc) · 468 Bytes

@eslint-react/core / isInsideComponentOrHook

Function: isInsideComponentOrHook()

function isInsideComponentOrHook(node: Node | undefined): boolean;

Check if a given AST node is inside a React component or hook

Parameters

Parameter Type Description
node Node | undefined The AST node to check

Returns

boolean

True if the node is inside a component or hook, false otherwise