Disallow the use of the private -routing
service.
There has been a public router
service since Ember 2.16 and using the private routing service should be unnecessary.
Examples of incorrect code for this rule:
import Component from '@ember/component';
import { inject as service } from '@ember/service';
export default Component.extend({
routing: service('-routing')
});
import Component from '@ember/component';
export default class MyComponent extends Component {
@service('-routing') routing;
}
Examples of correct code for this rule:
import Component from '@ember/component';
import { inject as service } from '@ember/service';
export default Component.extend({
router: service('router')
});
import Component from '@ember/component';
export default class MyComponent extends Component {
@service
router;
}