Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-callback-in-promise use cases #220

Open
xjamundx opened this issue Oct 21, 2021 · 2 comments
Open

no-callback-in-promise use cases #220

xjamundx opened this issue Oct 21, 2021 · 2 comments

Comments

@xjamundx
Copy link
Contributor

It has been requested that we support these use cases in the no-callback-in-promise rule

    // TODO: support safe callbacks
    // 'whatever.then((err) => { process.nextTick(() => cb()) })',
    // 'whatever.then((err) => { setImmediate(() => cb())) })',
    // 'whatever.then((err) => setImmediate(() => cb()))',
    // 'whatever.then((err) => process.nextTick(() => cb()))',
    // 'whatever.then((err) => process.nextTick(cb))',
    // 'whatever.then((err) => setImmediate(cb))',
@Sandesh333333

This comment was marked as spam.

@jack828
Copy link

jack828 commented Jun 8, 2022

This is exactly what the documentation recommends. Is there a reason why it isn't supported here?

https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-callback-in-promise.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants