@eslint-react/core / findParentJsxAttribute
function findParentJsxAttribute(node: Node, test: (node: JSXAttribute) => boolean): JSXAttribute | undefined;Traverses up the AST to find a parent JSX attribute node that matches a given test
| Parameter | Type | Default value | Description |
|---|---|---|---|
node |
Node |
undefined |
The starting AST node |
test |
(node: JSXAttribute) => boolean |
constTrue |
Optional predicate function to test if the attribute meets criteria Defaults to always returning true (matches any attribute) |
JSXAttribute | undefined
The first matching JSX attribute node found when traversing upwards, or undefined