12 lines
254 B
JavaScript
12 lines
254 B
JavaScript
export default function({ types: t }) {
|
|
return {
|
|
visitor: {
|
|
"BindingIdentifier|ReferencedIdentifier"(path) {
|
|
if (!t.isValidES3Identifier(path.node.name)) {
|
|
path.scope.rename(path.node.name);
|
|
}
|
|
},
|
|
},
|
|
};
|
|
}
|