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
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-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
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