Set function names from assignment expressions
Based on http://www.2ality.com/2015/09/function-names-es6.html.
This commit is contained in:
@@ -144,6 +144,9 @@ export default function ({ node, parent, scope, id }) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (t.isAssignmentExpression(parent)) {
|
||||
// foo = function () {};
|
||||
id = parent.left;
|
||||
} else if (!id) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user