Run prettier
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export default function ({ types: t }) {
|
||||
export default function({ types: t }) {
|
||||
return {
|
||||
visitor: {
|
||||
FunctionExpression: {
|
||||
@@ -7,13 +7,19 @@ export default function ({ types: t }) {
|
||||
if (!node.id) return;
|
||||
node._ignoreUserWhitespace = true;
|
||||
|
||||
path.replaceWith(t.callExpression(
|
||||
t.functionExpression(null, [], t.blockStatement([
|
||||
t.toStatement(node),
|
||||
t.returnStatement(node.id),
|
||||
])),
|
||||
[]
|
||||
));
|
||||
path.replaceWith(
|
||||
t.callExpression(
|
||||
t.functionExpression(
|
||||
null,
|
||||
[],
|
||||
t.blockStatement([
|
||||
t.toStatement(node),
|
||||
t.returnStatement(node.id),
|
||||
]),
|
||||
),
|
||||
[],
|
||||
),
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user