Generate better builder names for JSX* and TS* (#6967)

e.g. JSXIdentifier -> jsxIdentifier.
The jSXIdentifier alias isn't removed, so this commit doesn't introduce breaking changes.
This commit is contained in:
Nicolò Ribaudo
2017-12-07 12:17:40 +01:00
committed by GitHub
parent fcfa987926
commit a2aabbd33d
7 changed files with 101 additions and 8 deletions

View File

@@ -18,10 +18,10 @@ const TRACE_ID = "__self";
export default function() {
const visitor = {
JSXOpeningElement({ node }) {
const id = t.jSXIdentifier(TRACE_ID);
const id = t.jsxIdentifier(TRACE_ID);
const trace = t.thisExpression();
node.attributes.push(t.jSXAttribute(id, t.jSXExpressionContainer(trace)));
node.attributes.push(t.jsxAttribute(id, t.jsxExpressionContainer(trace)));
},
};