musea/require-title
Require title attribute in <art> block.
| Default severity | Presets | Automatic fix | Options |
|---|---|---|---|
error |
None | No | None |
Applies to: Musea .art.vue art, variant, and style blocks.
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>
Configuration (Vite+)
import { defineConfig } from "@vizejs/vite-plugin/vite-plus";
export default defineConfig({}).withVue({
linter: {
"preset": "incremental",
"rules": {
"musea/require-title": "error"
}
},
});
Then run vp run lint.