Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 668 Bytes

require-task-name-suffix.md

File metadata and controls

44 lines (35 loc) · 668 Bytes

require-task-name-suffix

This rule ensures that the names of all ember-concurrency tasks in the app end with Task to distinguish them from regular methods, actions or other properties on the classes.

Examples

This rule forbids the following:

export default Component.extend({
  submit: task(function*() {
    //...
  }),
})
export default class extends Component {
  @task *submit() {
    //...
  };
}

This rule allows the following:

export default Component.extend({
  submitTask: task(function*() {
    //...
  }),
})
export default class extends Component {
  @task *submitTask() {
    //...
  };
}