ember/template-no-forbidden-elements

April 20, 2026 ยท View on GitHub

๐Ÿ’ผ This rule is enabled in the ๐Ÿ“‹ template-lint-migration config.

This rule disallows the use of forbidden elements in template files.

The rule is configurable so teams can add their own disallowed elements. The default list of forbidden elements are meta, style, html, and script.

Examples

This rule forbids the following:

<template><script></script></template>
<template><style></style></template>
<template><html></html></template>
<template><meta charset='utf-8' /></template>

This rule allows the following:

<template><header></header></template>
<template><div></div></template>
<template>
  <head>
    <meta charset='utf-8' />
  </head>
</template>

Note: <meta> inside <head> is allowed as an exception.

Configuration

  • boolean โ€” true to enable with defaults / false to disable
  • string[] โ€” an array of element names to forbid (default: ['meta', 'style', 'html', 'script'])

References