You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add autofix for template-no-curly-component-invocation (block statements)
Transforms {{#foo-bar baz=qux as |x|}}content{{/foo-bar}} to
<FooBar @baz={{qux}} as |x|>content</FooBar>.
Only fixes BlockStatement (not MustacheStatement), matching the
original ember-template-lint scope. Handles namespace paths
(foo/bar → Foo::Bar), hash pair conversion, and block params.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,7 +215,7 @@ rules in templates can be disabled with eslint directives with mustache or html
215
215
|[template-no-capital-arguments](docs/rules/template-no-capital-arguments.md)| disallow capital arguments (use lowercase @arg instead of @Arg) ||||
216
216
|[template-no-chained-this](docs/rules/template-no-chained-this.md)| disallow redundant `this.this` in templates || 🔧 ||
217
217
|[template-no-class-bindings](docs/rules/template-no-class-bindings.md)| disallow passing classBinding or classNameBindings as arguments in templates ||||
Copy file name to clipboardExpand all lines: docs/rules/template-no-curly-component-invocation.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# ember/template-no-curly-component-invocation
2
2
3
+
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
4
+
3
5
> **HBS Only**: This rule applies to classic `.hbs` template files only (loose mode). It is not relevant for `gjs`/`gts` files (strict mode), where these patterns cannot occur.
// Stack of block-param name arrays, one entry per active GlimmerBlockStatement.
122
155
constblockParamStack=[];
@@ -282,6 +315,7 @@ module.exports = {
282
315
context.report({
283
316
node,
284
317
message: `You are using the component {{#${pathOriginal}}} with curly component syntax. You should use <${angleBracketName}> instead. If it is actually a helper you must manually add it to the 'no-curly-component-invocation' rule configuration, e.g. \`'no-curly-component-invocation': { allow: ['${pathOriginal}'] }\`.`,
0 commit comments