Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.12 KB

File metadata and controls

57 lines (39 loc) · 1.12 KB

ember/template-no-forbidden-elements

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