Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1020 Bytes

template-no-class-bindings.md

File metadata and controls

41 lines (26 loc) · 1020 Bytes

ember/template-no-class-bindings

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

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