New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
2 participants
@hzoo
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

This comment has been minimized.

Show comment
Hide comment
@tomkel

tomkel Sep 23, 2016

eslint 3.6.0 supports es2017 now

tomkel commented Sep 23, 2016

eslint 3.6.0 supports es2017 now

@hzoo hzoo referenced this issue Sep 27, 2016

Merged

remove eslint 2 logic #361

2 of 2 tasks complete
@hzoo

This comment has been minimized.

Show comment
Hide comment
@hzoo

hzoo Sep 27, 2016

Member

Doing this in #361

Member

hzoo commented Sep 27, 2016

Doing this in #361

@hzoo hzoo closed this Sep 27, 2016

@armano2 armano2 referenced this issue Jul 19, 2017

Merged

Add `no-async-in-computed-properties` rule #72

7 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment