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

New Rule: no-forever-call #158

Open
nickschot opened this issue Oct 27, 2021 · 0 comments
Open

New Rule: no-forever-call #158

nickschot opened this issue Oct 27, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@nickschot
Copy link
Member

nickschot commented Oct 27, 2021

forever is a yieldable constant exported by ember-concurrency. As most other exported yieldables are functions it's quite easy to write yield forever() which will not work. I propose a lint rule which guards against this.

docs: http://ember-concurrency.com/api/global.html#forever

Bad

@task
*example() {
  yield forever();
}

Good

@task
*example() {
  yield forever;
}
@Turbo87 Turbo87 added the enhancement New feature or request label Oct 27, 2021
@Turbo87 Turbo87 changed the title New Rule: dont-call-forever New Rule: no-forever-call Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants