Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.3 KB

no-classic-components.md

File metadata and controls

40 lines (27 loc) · 1.3 KB

no-classic-components

✅ The "extends": "plugin:ember/recommended" property in a configuration file enables this rule.

This rule aims to enforce Glimmer components instead of classic ones. We should migrate to Glimmer components because they have few advantages:

  • Simpler API
  • No wrapper element
  • Namespaced Arguments
  • Less lifecycle hooks
  • Stateless Template-Only Components
  • Unidirectional Dataflow

With that simpler API we could improve the DX and also lower the entry level for Ember.

Rule Details

If you want to migrate to Glimmer components this rule can help find the classic components that you need to migrate.

Examples

Examples of incorrect code for this rule:

import Component from '@ember/component';

Examples of correct code for this rule:

import Component from '@glimmer/component';

References