Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.24 KB

no-restricted-invocations.md

File metadata and controls

47 lines (30 loc) · 1.24 KB

no-restricted-invocations

Disallow certain components or helpers 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:

'no-restricted-invocations': ['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