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
|[template-no-obsolete-elements](docs/rules/template-no-obsolete-elements.md)| disallow obsolete HTML elements ||||
@@ -283,7 +283,7 @@ rules in templates can be disabled with eslint directives with mustache or html
283
283
|[template-require-valid-named-block-naming-format](docs/rules/template-require-valid-named-block-naming-format.md)| require valid named block naming format || 🔧 ||
284
284
|[template-self-closing-void-elements](docs/rules/template-self-closing-void-elements.md)| require self-closing on void elements || 🔧 ||
Copy file name to clipboardExpand all lines: docs/rules/template-no-action.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,25 @@ Examples of **correct** code for this rule:
42
42
</template>
43
43
```
44
44
45
+
```gjs
46
+
import action from './my-action-helper';
47
+
<template>
48
+
{{action this.handleClick}}
49
+
</template>
50
+
```
51
+
52
+
```gjs
53
+
<template>
54
+
{{#each items as |action|}}
55
+
<button {{action this.handleClick}}>x</button>
56
+
{{/each}}
57
+
</template>
58
+
```
59
+
60
+
## Strict-mode behavior
61
+
62
+
`action` is an ambient strict-mode keyword in Ember (registered in `STRICT_MODE_KEYWORDS`), so `{{action this.x}}` works in `.gjs`/`.gts` templates without an explicit import. The rule still flags those uses to discourage the deprecated keyword — but skips reports when `action` resolves to a JS-scope binding (an import or local declaration) or a template block param.
63
+
45
64
## Migration
46
65
47
66
- Replace `(action "methodName")` with method references or `(fn this.methodName)`
Copy file name to clipboardExpand all lines: docs/rules/template-no-inline-linkto.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,19 @@ Examples of **correct** code for this rule:
62
62
</template>
63
63
```
64
64
65
+
```gjs
66
+
// User-authored `<LinkTo>` (not from `@ember/routing`) is not flagged in
67
+
// strict mode, even when childless.
68
+
import LinkTo from './my-link-to-component';
69
+
<template>
70
+
<LinkTo />
71
+
</template>
72
+
```
73
+
74
+
## Strict-mode behavior
75
+
76
+
In `.gjs`/`.gts` strict mode, `<LinkTo>` only refers to Ember's router link when explicitly imported from `@ember/routing` (this also covers renamed imports such as `import { LinkTo as Link } from '@ember/routing'`). Without that import, `<LinkTo>` is treated as a user-authored component and the rule does not fire. The curly `{{link-to ...}}` form is unreachable in strict mode (`link-to` cannot be a JS identifier) and the autofix is skipped there.
Copy file name to clipboardExpand all lines: docs/rules/template-no-mut-helper.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# ember/template-no-mut-helper
2
2
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.
|`simplifyHelpers`|`boolean`|`true`| When `true`, also reports negated comparison helpers (e.g. `(not (eq ...))`) and suggests using `(not-eq ...)` instead. |
46
+
47
+
## Related Rules
48
+
49
+
-[simple-unless](template-simple-unless.md)
50
+
51
+
## References
52
+
53
+
-[no-negated-condition](https://eslint.org/docs/rules/no-negated-condition) from eslint
Copy file name to clipboardExpand all lines: docs/rules/template-no-unbound.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# ember/template-no-unbound
2
2
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
-
5
3
<!-- end auto-generated rule header -->
6
4
7
5
`{{unbound}}` is a legacy hold over from the days in which Ember's template engine was less performant. Its use today
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
4
+
3
5
<!-- end auto-generated rule header -->
4
6
5
7
The builtin components `LinkTo`, `Input`, `Textarea` has list of allowed arguments, and some argument names may be mistyped, this rule trying to highlight possible typos, checking for unknown arguments, also, some components has conflicted and required arguments, rule addressing this behavior.
0 commit comments