(path: NodePath<t.JSXElement>)
| 62 | } |
| 63 | |
| 64 | export function getJsxScopeAttribute(path: NodePath<t.JSXElement>) { |
| 65 | const attribute = path.node.openingElement.attributes.find( |
| 66 | (attr) => |
| 67 | attr.type === "JSXAttribute" && attr.name.name === "data-jsx-scope", |
| 68 | ); |
| 69 | return attribute && |
| 70 | t.isJSXAttribute(attribute) && |
| 71 | t.isStringLiteral(attribute.value) |
| 72 | ? attribute.value.value |
| 73 | : undefined; |
| 74 | } |
no outgoing calls
no test coverage detected