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

@@ -34,7 +34,7 @@ export default function() {
const visitor = {
JSXOpeningElement(path, state) {
const id = t.jSXIdentifier(TRACE_ID);
const id = t.jsxIdentifier(TRACE_ID);
const location = path.container.openingElement.loc;
if (!location) {
// the element was generated and doesn't have location information
@@ -64,7 +64,7 @@ export default function() {
}
const trace = makeTrace(state.fileNameIdentifier, location.start.line);
attributes.push(t.jSXAttribute(id, t.jSXExpressionContainer(trace)));
attributes.push(t.jsxAttribute(id, t.jsxExpressionContainer(trace)));
},
};