no-link-to-positional-params
✅ The extends: 'recommended'
property in a configuration file enables this rule.
Disallows passing positional parameters into link-to in favor of named arguments.
This rule forbids the following:
{{ link-to " About Us" " about" }}
{{ #link-to " about" }} About Us{{ /link-to }}
{{ #link-to " post" @post }} Read {{ @post.title }} ...{{ /link-to }}
{{ #link-to " post.comment" @comment.post @comment }}
Comment by {{ @comment.author.name }} on {{ @comment.date }}
{{ /link-to }}
{{ #link-to " posts" (query-params direction =" desc" showArchived =false )}}
Recent Posts
{{ /link-to }}
This rule allows the following:
<LinkTo @route =" about" >About Us</LinkTo >
<LinkTo @route =" post" @model ={{ @post }} >Read {{ @post.title }} ...</LinkTo >
<LinkTo @route =" post.comment" @models ={{ array post comment }} >
Comment by {{ comment.author.name }} on {{ comment.date }}
</LinkTo >
<LinkTo @route =" posts" @query ={{ hash direction =" desc" showArchived =false }} >
Recent Posts
</LinkTo >
More information is available in RFC-0698