Vize

vue/no-content-outside-block

Disallow content outside SFC top-level blocks.

Default severity Presets Automatic fix Options
warning None No None

Applies to: Vue SFC templates and blocks, with script context where the rule requires it.

Bad

The leading text is outside every SFC top-level block.

unexpected
<template><div /></template>

Good

All authored content is inside the template block.

<template><div>expected</div></template>

Configuration (Vite+)

import { defineConfig } from "@vizejs/vite-plugin/vite-plus";

export default defineConfig({}).withVue({
  linter: {
    "preset": "incremental",
    "rules": {
      "vue/no-content-outside-block": "warn"
    }
  },
});

Then run vp run lint.