Vize

Rules

Vize's linter checks Vue single-file components: templates, scripts, styles, and the links between files. Pick a preset, then turn single rules up, down, or off.

Turn on linting

With Vite+, import defineConfig from @vizejs/vite-plugin/vite-plus, pass linter directly to withVue, and run vp run lint. That command runs Vize's rules and Oxlint together.

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

export default defineConfig({}).withVue({
  linter: {
    preset: "happy-path",
    rules: {
      "vue/no-v-html": "off",
      "a11y/alt-text": "error",
    },
  },
});

Each rule takes off, warn, or error. Rules with settings read them from linter.ruleOptions inside withVue; see Rule Options.

If your project already has a script named lint, run vp run vize:lint instead. The built-in vp lint command is Vite+'s own checker and does not run Vize's rules.

Presets

A preset is a starting set of rules. happy-path is the default.

Preset Rules What it turns on
essential 85 Template and directive validity, Vue 3 removals (vue/no-deprecated-*, script/no-deprecated-*), script macro, nextTick and Options API correctness, lifecycle hooks, watchers and expose registered after await, imports from vue instead of @vue/*, unused components, vue/no-v-html, vue/no-unsafe-url, html/id-duplication
happy-path (default) 147 essential, plus template formatting conventions (including v-bind shorthand and hyphenated component events), accessibility, HTML conformance, SSR hazards, unused properties, declared emits, and typed props and emits
ecosystem 155 happy-path, plus the ecosystem library checks
nuxt 213 opinionated, adjusted for Nuxt auto-imports
opinionated 214 happy-path, plus stricter conventions, typed props, type-based defineProps/defineEmits, <script setup> macro order, kebab-case event names, consistent props/emits key quotes, useTemplateRef, defineSlots, prop default and emit hygiene, defineOptions, and the css/* style rules
incremental 0 Nothing. Start here to turn on only the rules you name.

Counts exclude cross-file rules. When compiler.compatibility.vueVersion is 2 or 2.7, the Vue 3 removal checks are off.

Find a rule

Page What it covers
All rules Every rule in one index, grouped by category, with the smallest preset that turns it on
Vue SFC templates, directives, components, blocks, and Vue 3 migration
Type and script <script setup>, compiler macros, reactivity, and type-aware checks
HTML HTML validity and semantic markup
Accessibility ARIA, keyboard interaction, labels, landmarks, and media alternatives
SSR Server rendering and hydration hazards
Vapor Constraints for components compiled in Vapor mode
Ecosystem and Nuxt Nuxt, Vue Router, Pinia, Vue I18n, Vue Test Utils, and Void Vue
CSS Plain CSS correctness and maintainability checks
Musea Musea .art.vue stories, variants and design tokens
petite-vue HTML pages that use petite-vue
Cross-file Checks across components, providers, and routers, turned on with crossFile: true
Rule Options Typed ruleOptions and their defaults
Migrating from ESLint eslint-plugin-vue rule names mapped to Vize, with differences

Every rule page starts with what the rule checks, its default severity and presets. Then it shows a Bad example that the rule reports and a Good example that it accepts, each with a one-line reason, and the configuration that turns the rule on. The examples are the same files the linter's test suite runs.

Type-aware rules

Rules under type/ read type information from the TypeScript project in tsconfig.json. They need typeAware: true in the linter passed to withVue as well as a preset or a rules entry that turns them on. Declare shared environment names in compilerOptions.types or with project references, not in a separate globals list in the Vize configuration.