Skip to content
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

Parsing error: Unexpected token await/* #1179

Closed
mochja opened this issue Aug 17, 2018 · 1 comment

Comments

@mochja
Copy link

commented Aug 17, 2018

What version of standard?
11.0.1

What operating system, Node.js, and npm version?
Linux x86, Node v10.8.0, npm v6.2.0

What did you expect to happen?
Continue without parsing error

What actually happened?
When linting following code an parser error occured

async function* fromLinesToNumberedLines(lines) { // Parsing error: Unexpected token *
  let counter = 1;
  for await (const line of lines) { // Parsing error: Unexpected token await
    yield `${counter}: ${line}`;
    counter++;
  }
}

https://zaiste.net/nodejs_10_asynchronous_iteration_async_generators/

@mochja

This comment has been minimized.

Copy link
Author

commented Aug 17, 2018

Works with babel-eslint parser.

@mochja mochja closed this Aug 17, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Nov 15, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
1 participant
You can’t perform that action at this time.