Merge pull request babel/babel-eslint#169 from hzoo/i-168

async func and space-before-function-paren
This commit is contained in:
Henry Zhu 2015-08-16 16:11:57 -04:00
parent 5b57763788
commit 9740af8be4
2 changed files with 11 additions and 0 deletions

View File

@ -235,6 +235,10 @@ var astTransformVisitor = {
// functions // functions
if (this.isFunction()) {
if (node.async) node.generator = true;
}
if (this.isAwaitExpression()) { if (this.isAwaitExpression()) {
node.type = "YieldExpression"; node.type = "YieldExpression";
node.delegate = node.all; node.delegate = node.all;

View File

@ -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"] },
[ ]
)
});
}); });