Skip to content

require-component-is

Reports a <component> element with no :is (v-bind:is).

<component> renders what is names and nothing without it, so the element shows nothing.

To fix, add :is with the component or tag name to render.

Reported
...
<template v-if="a"><p>ok</p></template>
<template #head><p>ok</p></template>
...
<component></component>
<component :is="view" />
...
angular:
lint:
rules:
require-component-is: warn # off, warn (default), error
html:
lint:
rules:
require-component-is: warn # off, warn (default), error
svelte:
lint:
rules:
require-component-is: warn # off, warn (default), error
vue:
lint:
rules:
require-component-is: warn # off, warn (default), error

Enabled by the presets: html/eslint-plugin-vue-recommended.

Suppress one line with sudsy-disable-next-line require-component-is in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
eslint-plugin-vue require-component-is full