Skip to content

Instantly share code, notes, and snippets.

@pablocattaneo
Created February 19, 2019 19:02
Show Gist options
  • Save pablocattaneo/5fbbac86b04b360ca4b87a567f1e0739 to your computer and use it in GitHub Desktop.
Save pablocattaneo/5fbbac86b04b360ca4b87a567f1e0739 to your computer and use it in GitHub Desktop.
Eslint rule prefer asyc await over then. Source: https://www.npmjs.com/package/eslint-plugin-promise
(Check if the rule was added to eslint core) https://github.com/eslint/eslint/pull/11033
1- Install https://www.npmjs.com/package/eslint-plugin-promise
2- Active rule: "promise/prefer-await-to-then": "error"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment