Skip to content

Commit 179e8b1

Browse files
committed
fix(template-no-attrs-in-components): change templateMode 'loose' → 'both'
The rule applies in both HBS and GJS/GTS — classic @ember/component components can be authored in strict mode too, and their templates can still leak `this.attrs.*`. Regenerated docs to drop the incorrect "HBS Only" note.
1 parent 33446a6 commit 179e8b1

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

docs/rules/template-no-attrs-in-components.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# ember/template-no-attrs-in-components
22

3-
> **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.
4-
53
<!-- end auto-generated rule header -->
64

75
This rule prevents the usage of `this.attrs` property to access values passed to the component. Use `@arg` syntax instead.

lib/rules/template-no-attrs-in-components.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
description: 'disallow attrs in component templates',
1414
category: 'Deprecations',
1515
url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/template-no-attrs-in-components.md',
16-
templateMode: 'loose',
16+
templateMode: 'both',
1717
},
1818
schema: [],
1919
messages: {

0 commit comments

Comments
 (0)