Skip to content

New Rule: no-promise-chains-in-tasks #2

@Turbo87

Description

@Turbo87

This rule forbids the use of .then(), .catch() and .finally() in task functions

Bad

submitTask: task(function*() {
  yield this.post.save().then(() => {
    this.set('saved', true);
  });
});

Good

submitTask: task(function*() {
  yield this.post.save();
  this.set('saved', true);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions