require-component-is
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: warnhtml/eslint-plugin-vue-recommended
What it does
Section titled “What it does”Reports a <component> element with no :is (v-bind:is).
Why it matters
Section titled “Why it matters”<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.
Example
Section titled “Example”... <template v-if="a"><p>ok</p></template> <template #head><p>ok</p></template>... <component></component> <component :is="view" />...Configuration
Section titled “Configuration”angular: lint: rules: require-component-is: warn # off, warn (default), errorhtml: lint: rules: require-component-is: warn # off, warn (default), errorsvelte: lint: rules: require-component-is: warn # off, warn (default), errorvue: lint: rules: require-component-is: warn # off, warn (default), errorEnabled 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.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| eslint-plugin-vue | require-component-is |
full |