Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 827 Bytes

no-debug.md

File metadata and controls

58 lines (46 loc) · 827 Bytes

no-debug

This rule ensures that all ember-concurrency tasks in the app do not have debug shipped into production.

Examples

This rule forbids the following:

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

This rule allows the following:

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