Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.28 KB

File metadata and controls

49 lines (31 loc) · 1.28 KB

ember/template-no-restricted-invocations

Disallow certain components, helpers or modifiers from being used.

Use cases include:

  • You bring in some addon like ember-composable-helpers, but your team deems one or many of the helpers not suitable and wants to guard against their usage
  • You want to discourage use of a deprecated component

Examples

Given a config of:

["foo-bar"]

This rule forbids the following:

{{foo-bar}}
{{#foo-bar}}{{/foo-bar}}
<FooBar />

Configuration

One of these:

  • string[] - helpers or components to disallow (using kebab-case names like nested-scope/component-name)
  • object[] - with the following keys:
    • names - string[] - helpers or components to disallow (using kebab-case names like nested-scope/component-name)
    • message - string - custom error message to report for violations (typically a deprecation notice / explanation of why not to use it and a recommended replacement)

Related Rules

References