ember/template-no-deprecated

February 27, 2026 · View on GitHub

Disallows using components, helpers, or modifiers that are marked @deprecated in their JSDoc.

This rule requires TypeScript (parserServices.program must be present). It is a no-op in plain .gjs files because cross-file import deprecations require type information.

Rule Details

This rule checks if imported Glimmer components, helpers, or modifiers are marked @deprecated in their JSDoc.

Covered syntax:

Template syntaxExample
Component element<DeprecatedComponent />
Helper / value mustache{{deprecatedHelper}}
Block component{{#DeprecatedBlock}}…{{/DeprecatedBlock}}
Modifier<div {{deprecatedModifier}}>
Component argument<MyComp @deprecatedArg={{x}}>

Examples

Given a module:

// deprecated-component.ts
/** @deprecated use NewComponent instead */
export default class DeprecatedComponent {}

Examples of incorrect code for this rule:

import DeprecatedComponent from './deprecated-component';

<template>
  <DeprecatedComponent />
</template>
import { deprecatedHelper } from './deprecated-helper';

<template>
  {{deprecatedHelper}}
</template>

Examples of correct code for this rule:

import NewComponent from './new-component';

<template>
  <NewComponent />
</template>