Is there a node or vscode feature that will keep me from accidentally forgetting to call my async functions with await? I've done this a few times and it always costs me hours of bug-hunting.
There is an ESlint rule which warns for async functions which have no await expression.
EDIT: You need to create '.eslintrc.json' file and add some rules to it. If you installed ESLint globally, you ca do it by running eslint --init
. You can find more information in the vscode plugin github repo .
The availabe rules related to async/await are:
You can find more about ESLint and available rules on the official documentation page .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.