Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Remove the ast changes for async/await when ESLint supports it #350

Closed
hzoo opened this issue Jul 29, 2016 · 2 comments
Closed

Remove the ast changes for async/await when ESLint supports it #350

hzoo opened this issue Jul 29, 2016 · 2 comments

Comments

@hzoo
Copy link
Member

hzoo commented Jul 29, 2016

// async function as generator
if (path.isFunction()) {
if (node.async) node.generator = true;
}
// TODO: remove (old esprima)
if (path.isFunction()) {
if (!node.defaults) {
node.defaults = [];
}
}
// await transform to yield
if (path.isAwaitExpression()) {
node.type = "YieldExpression";
node.delegate = node.all;
delete node.all;
}

    if (path.isFunction()) {
      if (node.async) node.generator = true;
    }

    // await transform to yield
    if (path.isAwaitExpression()) {
      node.type = "YieldExpression";
      node.delegate = node.all;
      delete node.all;
    }

Would need to modify the generator star spacing rule so we can also remove it in eslint-plugin-babel

@tomkel
Copy link

tomkel commented Sep 23, 2016

eslint 3.6.0 supports es2017 now

@hzoo hzoo mentioned this issue Sep 27, 2016
2 tasks
@hzoo
Copy link
Member Author

hzoo commented Sep 27, 2016

Doing this in #361

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants