ember/template-require-valid-named-block-naming-format
April 20, 2026 ยท View on GitHub
๐ผ This rule is enabled in the ๐ template-lint-migration config.
๐ง This rule is automatically fixable by the --fix CLI option.
Require named blocks to use a valid naming format (camelCase or kebab-case).
The default naming format used is camelCase.
Examples
This rule forbids the following when the camelCase naming format is enabled:
<template>
{{yield to="foo-bar"}}
{{has-block "foo-bar"}}
{{if (has-block "foo-bar")}}
{{has-block-params "foo-bar"}}
{{if (has-block-params "foo-bar")}}
</template>
This rule allows the following when the camelCase naming format is enabled:
<template>
{{yield to="fooBar"}}
{{has-block "fooBar"}}
{{if (has-block "fooBar")}}
{{has-block-params "fooBar"}}
{{if (has-block-params "fooBar")}}
</template>
This rule forbids the following when the kebab-case naming format is enabled:
<template>
{{yield to="fooBar"}}
{{has-block "fooBar"}}
{{if (has-block "fooBar")}}
{{has-block-params "fooBar"}}
{{if (has-block-params "fooBar")}}
</template>
This rule allows the following when the kebab-case naming format is enabled:
<template>
{{yield to="foo-bar"}}
{{has-block "foo-bar"}}
{{if (has-block "foo-bar")}}
{{has-block-params "foo-bar"}}
{{if (has-block-params "foo-bar")}}
</template>
Configuration
- boolean --
trueenables the rule with the defaultcamelCaseformat andfalsedisables it - string --
"camelCase"requires the use of thecamelCasenaming format, and"kebab-case"requires the use of thekebab-casenaming format