💼 This rule is enabled in the ✅ recommended
config.
💡 This rule is manually fixable by editor suggestions.
Top-level await is more readable and can prevent unhandled rejections.
(async () => {
try {
await run();
} catch (error) {
console.error(error);
process.exit(1);
}
})();
run().catch(error => {
console.error(error);
process.exit(1);
});
async function main() {
try {
await run();
} catch (error) {
console.error(error);
process.exit(1);
}
}
main();
await run();