Skip to content

Instantly share code, notes, and snippets.

@lukehorvat
Last active July 31, 2018 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukehorvat/3a51e56a22cc032e75e467eafb300b7f to your computer and use it in GitHub Desktop.
Save lukehorvat/3a51e56a22cc032e75e467eafb300b7f to your computer and use it in GitHub Desktop.
ESLint rule to disallow generators and async/await. Since AST selectors are used, ESLint 3.18.0 (or higher) is required.
{
"rules": {
"no-restricted-syntax": [
"error",
"[generator=true]",
"[async=true]",
"AwaitExpression"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment