Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.17 KB

File metadata and controls

43 lines (27 loc) · 1.17 KB

ember/template-no-class-bindings

💼 This rule is enabled in the 📋 template-lint-migration config.

HBS Only: This rule applies to classic .hbs template files only (loose mode). It is not relevant for gjs/gts files (strict mode), where these patterns cannot occur.

Disallow passing classBinding or classNameBindings as arguments within templates. These are legacy Ember Classic patterns that should be replaced with modern approaches.

Examples

This rule forbids the following:

<SomeThing @classBinding='isActive:active' />
{{some-thing classNameBindings='isActive:active:inactive'}}
<SomeThing @classNameBindings='isActive:active:inactive' />

This rule allows the following:

<SomeThing class={{if this.isActive 'active'}} />
<SomeThing />

Migration

  • find in templates and remove classBinding and/or classNameBindings.

References