html/no-empty-palpable-content
Disallow empty elements that expect visible content
Default severity: warning
Presets: happy-path, nuxt, ecosystem, opinionated
Automatic fix: None; review the suggested change
Applies to: Vue SFC templates and blocks, with script context where the rule requires it
Options: See typed options and defaults.
Configuration (Vite+)
import { defineConfig } from "@vizejs/vite-plugin/vite-plus";
export default defineConfig({
lint: {
vize: {
"preset": "incremental",
"rules": {
"html/no-empty-palpable-content": "warn"
}
},
},
});
vp run lint
Bad
The paragraph, list item, and table cell all have empty palpable content.
<template>
<p></p>
<li></li>
<td></td>
</template>
Good
Text fills the paragraph, interpolation supplies the list item, and aria-label explicitly names the otherwise empty cell.
<template>
<p>Overview</p>
<li>{{ item.label }}</li>
<td aria-label="No value"></td>
</template>
Good avoids this rule's finding under the configuration above; other rules may still report diagnostics.