Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
JSXOpeningElement(path) {
const jsxName = path.node.name.name
if (startsWithCapitalLetter(jsxName)) {
componentNames.push(jsxName)
path.node.attributes.push(
t.jSXAttribute(
t.jSXIdentifier(`mdxType`),
t.stringLiteral(jsxName)
)
)
}
}
}