# Require v-bind:to or to of <g-link>
elements (gridsome/require-g-link-to)
# 📖 Rule Details
- This rule reports the
<g-link>
elements which do not havev-bind:to
,to
orv-bind:href
,href
.
👎 Examples of incorrect code for this rule:
<template>
<div>
<g-link class="foo">link is here</g-link>
</div>
</template>
👍 Examples of correct code for this rule:
<template>
<div>
<g-link to="/" class="foo">link is here</g-link>
<g-link :to="article.path" class="foo">link is here</g-link>
<g-link :to="{ name: 'about' }" class="foo">link is here</g-link>
<g-link href="http://www.example.com" class="foo">link is here</g-link>
<g-link href="https://www.example.com" class="foo">link is here</g-link>
<g-link :href="absolute.link" class="foo">link is here</g-link>
</div>
</template>
# 🔧 Options
Nothing.