Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.
This repository was 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

@hzoo

Description

@hzoo

// 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions