Skip to content

Latest commit

 

History

History
51 lines (29 loc) · 1.39 KB

File metadata and controls

51 lines (29 loc) · 1.39 KB

ember/template-deprecated-inline-view-helper

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

🔧 This rule is automatically fixable by the --fix CLI option.

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.

In Ember 1.12, support for invoking the inline View helper was deprecated.

Rule Details

This rule flags:

  • {{view}} mustache or block statements that have params or hash pair arguments (e.g., {{view 'foo'}}, {{view 'foo' key=value}}).
  • {{view.property}} path expressions (e.g., {{view.also-bad}}).
  • Hash values referencing view.* paths (e.g., please=view.stop).

Examples

This rule forbids the following:

{{view 'this-is-bad'}}

{{view.also-bad}}

{{qux-qaz please=view.stop}}

{{#not-this please=view.stop}}{{/not-this}}

<div foo={{view.bar}}></div>

This rule allows the following:

{{this-is-better}}

{{qux-qaz this=good}}

{{#ok-this yay=nice}}{{/ok-this}}

<div foo={{bar}}></div>

References