Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 853 Bytes

File metadata and controls

42 lines (27 loc) · 853 Bytes

ember/template-require-strict-mode

Require templates to be in strict mode.

Templates should use the strict mode syntax (template tag format) rather than loose template files. Strict mode templates (.gjs / .gts files) provide better integration with JavaScript and type checking.

Examples

This rule forbids the following:

<div>
  Hello World
</div>

(in a .hbs file)

This rule allows the following:

<template>
  Hello World
</template>

(in a .gjs or .gts file)

Why?

Strict mode templates provide:

  • Better integration with JavaScript tooling
  • Type safety in TypeScript projects
  • Clearer component boundaries
  • Easier refactoring and navigation

References