musea/require-title
Require title attribute in <art> block
Default severity: error
Presets: none
Automatic fix: None; review the suggested change
Applies to: Musea .art.vue art, variant, and style blocks
Options: No rule-specific options. Severity and preset selection are configurable.
Configuration (Vite+)
import { defineConfig } from "@vizejs/vite-plugin/vite-plus";
export default defineConfig({
lint: {
vize: {
"preset": "incremental",
"rules": {
"musea/require-title": "error"
}
},
},
});
vp run lint
Bad
The art block identifies Button.vue but supplies no title.
<art component="./Button.vue">
<variant name="primary" />
</art>
Good
The defineArt options supply the Button title for the art block.
<script setup>
defineArt("./Button.vue", { title: "Button" });
</script>
<art>
<variant name="primary" />
</art>
Good avoids this rule's finding under the configuration above; other rules may still report diagnostics.