🔧 This rule is automatically fixable by the --fix CLI option.
Disallows the inline form of the link-to component and enforces the block form instead.
Ember's link-to component has both an inline form and a block form. This rule forbids the inline form.
This rule forbids the following (inline form):
This rule allows the following (block form):
The block form is a little longer but has advantages over the inline form:
- It maps closer to the use of HTML anchor tags which wrap their inner content.
- It provides an obvious way for developers to put nested markup and components inside of their link.
- The block form's argument order is more direct: "link to route". The inline form's argument order is somewhat ambiguous (link text then link target). This is opposite of the order in HTML (
hrefthen link text).