Disallow legacy computed properties and computed macros.
This rule disallows:
computedimported from@ember/object- Any import from
@ember/object/computed(for exampleand,gt,sortBy, and other macros)
Use @tracked and native getters instead.
Examples of incorrect code for this rule:
import { computed } from '@ember/object';import { and, gt, sortBy } from '@ember/object/computed';Examples of correct code for this rule:
import { tracked } from '@glimmer/tracking';
class Example {
@tracked count = 0;
get doubled() {
return this.count * 2;
}
}