Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.26 KB

File metadata and controls

59 lines (40 loc) · 1.26 KB

ember/template-no-forbidden-elements

💼 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

  • booleantrue to enable with defaults / false to disable
  • string[] — an array of element names to forbid (default: ['meta', 'style', 'html', 'script'])

References