eslint-community/eslint-plugin-promise

no-callback-in-async-function rule?

Open

#155 opened on Jan 16, 2019

 (2 comments) (2 reactions) (0 assignees)JavaScript (103 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (998 stars)
PR merge metrics
 (PR metrics pending)

Description

Putting callback code inside of async functions like this can lead to a lot of trouble:

async function bigProbs() {
    doSomething(function(err) {
        if (err) throw err; // won't be caught by the parent
        // ...
    })
}

Contributor guide