ember/no-old-shims

November 8, 2022 ยท View on GitHub

๐Ÿ’ผ This rule is enabled in the โœ… recommended config.

๐Ÿ”ง This rule is automatically fixable by the --fix CLI option.

Don't use import paths from ember-cli-shims.

The import paths in ember-cli-shims were never considered public API and were recently replaced by RFC #176. If you use ember-cli-babel with version 6.6.0 or above you can start using the "New Module Imports" instead of the old shims or the Ember global directly. This will enable us to build better tree shaking feature into Ember CLI.

Examples

Examples of incorrect code for this rule:

import Component from 'ember-component';
import EmberObject from 'ember-object';
import computed from 'ember-computed';
import Service from 'ember-service';
import inject from 'ember-service/inject';

Examples of correct code for this rule:

import Component from '@ember/component';
import EmberObject, { computed } from '@ember/object';
import Service, { inject } from '@ember/service';