Merge pull request babel/babel-eslint#169 from hzoo/i-168
async func and space-before-function-paren
This commit is contained in:
parent
5b57763788
commit
9740af8be4
@ -235,6 +235,10 @@ var astTransformVisitor = {
|
||||
|
||||
// functions
|
||||
|
||||
if (this.isFunction()) {
|
||||
if (node.async) node.generator = true;
|
||||
}
|
||||
|
||||
if (this.isAwaitExpression()) {
|
||||
node.type = "YieldExpression";
|
||||
node.delegate = node.all;
|
||||
|
||||
@ -1302,4 +1302,11 @@ describe("verify", function () {
|
||||
[ ]
|
||||
)
|
||||
});
|
||||
|
||||
it("async function with space-before-function-paren #168", function () {
|
||||
verifyAndAssertMessages("it('handles updates', async function() {});",
|
||||
{ "space-before-function-paren": [1, "never"] },
|
||||
[ ]
|
||||
)
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user