-
-
Notifications
You must be signed in to change notification settings - Fork 94
Mistake promise/prefer-await-to-callback #116
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
Comments
For now, I would disable that rule for the line using: // eslint-disable-next-line promise/prefer-await-to-callbacks
dbConn.on('error', (err) => logger.warn('MongoDB event `error`:', err)); This seems like a bug though. Perhaps that rule should ignore callbacks in an |
I think I found a fix for this - pushing up to #117. |
Maybe this plugin can help you: eslint-plugin-unicorn, check the rule |
Also the rule page is missing examples: Opened a ticket: |
How do I avoid an error with
promise/prefer-await-to-callback
for this following code which use events:The text was updated successfully, but these errors were encountered: