Skip to content

fix: ignore event listener callbacks in prefer-await-to-callbacks#117

Merged
macklinu merged 2 commits intomasterfrom
fix/event-callback-bug
May 24, 2018
Merged

fix: ignore event listener callbacks in prefer-await-to-callbacks#117
macklinu merged 2 commits intomasterfrom
fix/event-callback-bug

Conversation

@macklinu
Copy link
Copy Markdown
Contributor

@macklinu macklinu commented Mar 8, 2018

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • New rule
  • Changes an existing rule
  • Add autofixing to a rule
  • Other, please explain:

What changes did you make? (Give an overview)

This resolves #116, first checking if the callback function is supplied to an emitter.on() function. This rule should ignore reporting on that case, IMO. Feedback welcome.

@macklinu macklinu changed the title test: add failing test for #116 fix: ignore event listener callbacks in prefer-await-to-callbacks Mar 8, 2018
@macklinu macklinu force-pushed the fix/event-callback-bug branch from 3f5d946 to d0566dc Compare March 12, 2018 16:07
@macklinu
Copy link
Copy Markdown
Contributor Author

I amended the fix commit to ignore emitter.on() and emitter.once() callbacks.

@macklinu macklinu merged commit 4ebd2c6 into master May 24, 2018
@macklinu macklinu deleted the fix/event-callback-bug branch May 24, 2018 16:10
jimthedev referenced this pull request in commitizen/cz-cli May 25, 2018
This Pull Request updates dependency [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) from `v3.7.0` to `v3.8.0`



<details>
<summary>Release Notes</summary>

### [`v3.8.0`](https://github.com/xjamundx/eslint-plugin-promise/blob/master/CHANGELOG.md#&#8203;380)
[Compare Source](eslint-community/eslint-plugin-promise@v3.7.0...v3.8.0)
* Removed `promise/avoid-new` from recommended configuration
  ([#&#8203;119](`https://github.com/xjamundx/eslint-plugin-promise/pull/119`))
* Ignored event listener callbacks in `promise/prefer-await-to-callbacks`
  ([#&#8203;117](`https://github.com/xjamundx/eslint-plugin-promise/pull/117`))
* Ignored top-level awaits in `promise/prefer-await-to-then`
  ([#&#8203;126](`https://github.com/xjamundx/eslint-plugin-promise/pull/126`))
* Added docs for `promise/no-nesting` and `promise/prefer-await-to-then`
  ([#&#8203;120](`https://github.com/xjamundx/eslint-plugin-promise/pull/120`))
  ([#&#8203;121](`https://github.com/xjamundx/eslint-plugin-promise/pull/121`))

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
Copy link
Copy Markdown

@Sandesh333333 Sandesh333333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bubble-counter 1

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

Successfully merging this pull request may close these issues.

Mistake promise/prefer-await-to-callback

2 participants