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

Modifying semi rule to support for await #126

Merged
merged 1 commit into from
May 10, 2017

Conversation

kobelb
Copy link
Contributor

@kobelb kobelb commented May 10, 2017

The async iterator proposal adds support for the following code

for await (const line of readLines(filePath)) {
  console.log(line);
}

async function* readLines(path) {
  let file = await fileOpen(path);

  try {
    while (!file.EOF) {
      yield await file.readLine();
    }
  } finally {
    await file.close();
  }
}

However, the ESLint rule expects there to be a semi-colon. Since this is currently a stage-3 proposal, the ESLint team has declined implementing it at this time per eslint/eslint#7417

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@kentcdodds kentcdodds merged commit 9468524 into babel:master May 10, 2017
@kentcdodds
Copy link
Member

Thanks a ton for the contribution 👍

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

Successfully merging this pull request may close these issues.

2 participants