Skip to content

Lint Rules Reference

Verter ships with approximately 164 built-in lint rules organized into 11 categories. Rules run natively in Rust inside the LSP, providing instant diagnostics without external tooling.

Comment Directives

You can disable or adjust rule severity inline using HTML comments in templates:

html
<!-- @verter:disable no-v-html -->
<div v-html="content"></div>
<!-- @verter:enable no-v-html -->

<!-- @verter:disable-next-line no-v-html -->
<div v-html="content"></div>

<!-- @verter:level no-v-html warning -->
<div v-html="content"></div>

Rule Categories

VueEssential

Error-preventing rules that catch invalid Vue syntax and common mistakes. These are included in the Essential preset and all higher presets.

Rule NameDefault SeverityAuto-fixDescription
valid-v-iferror--Validate v-if directive usage
valid-v-else-iferror--Validate v-else-if directive usage
valid-v-elseerror--Validate v-else directive usage
valid-v-forerror--Validate v-for directive usage
valid-v-showerror--Validate v-show directive usage
valid-v-onerror--Validate v-on directive usage
valid-v-binderror--Validate v-bind directive usage
valid-v-modelerror--Validate v-model directive usage
valid-v-sloterror--Validate v-slot directive usage
valid-v-onceerror--Validate v-once directive usage
valid-v-preerror--Validate v-pre directive usage
no-reserved-component-nameserror--Disallow using reserved HTML elements as component names
require-component-iserror--Require is attribute on <component> elements
no-v-text-v-html-on-componenterror--Disallow v-text/v-html on component elements
no-useless-template-attrserror--Disallow useless attribute on <template>
no-child-contenterror--Disallow child content when using v-html/v-text

...and more valid-v-*, require-*, no-dupe-*, no-unused-* rules.

VueRecommended

Code quality and consistency rules. Included in the Recommended preset.

Rule NameDefault SeverityAuto-fixDescription
attribute-orderwarnyesEnforce consistent attribute ordering
html-self-closingwarnyesEnforce self-closing style on elements
v-bind-stylewarnyesEnforce v-bind shorthand style (:prop vs v-bind:prop)
v-on-stylewarnyesEnforce v-on shorthand style (@event vs v-on:event)
v-slot-stylewarnyesEnforce v-slot shorthand style (#name vs v-slot:name)
multi-word-component-nameswarn--Require multi-word component names
component-definition-name-casingwarnyesEnforce casing of component definition names
prefer-true-attribute-shorthandwarnyesPrefer shorthand for boolean attributes (disabled vs disabled="true")

...and more component-*, html-*, order-in-* rules.

Vue Deprecation

Rules for Vue 2 to Vue 3 migration, catching deprecated patterns.

Rule NameDefault SeverityAuto-fixDescription
no-deprecated-destroyed-lifecycleerroryesDisallow deprecated destroyed/beforeDestroy lifecycle hooks
no-deprecated-v-on-native-modifiererroryesDisallow deprecated .native modifier on v-on
no-deprecated-scope-attributeerroryesDisallow deprecated scope attribute
no-deprecated-slot-attributeerroryesDisallow deprecated slot attribute
no-deprecated-v-bind-syncerroryesDisallow deprecated v-bind .sync modifier
no-deprecated-v-on-number-modifierserror--Disallow deprecated number modifiers on v-on
no-deprecated-dollar-listeners-apierror--Disallow deprecated $listeners usage
no-deprecated-dollar-scopedslots-apierror--Disallow deprecated $scopedSlots usage

...and more no-deprecated-* rules (~12 total).

Script

Rules for the <script> and <script setup> blocks.

Rule NameDefault SeverityAuto-fixDescription
define-macros-orderwarnyesEnforce order of defineProps/defineEmits/defineSlots
no-export-in-script-setuperror--Disallow export in <script setup>
prefer-use-template-refwarn--Prefer useTemplateRef() over ref() for template refs
require-symbol-providewarn--Require Symbol keys for provide()
no-async-in-computederror--Disallow async functions in computed()
no-watch-after-awaiterror--Disallow watch() after await in setup
require-default-propwarn--Require default value for optional props
no-unused-emit-declarationswarn--Disallow unused emit declarations
no-ref-as-operanderroryesDisallow using ref values directly in expressions without .value

...and more define-*, no-*, prefer-*, require-* rules (~20 total).

CSS

Rules for <style> blocks.

Rule NameDefault SeverityAuto-fixDescription
unused-css-selectorwarn--Detect CSS selectors that don't match any template element
no-undefined-css-classwarn--Detect class names used in template but not defined in <style>

HTML

Rules for HTML elements and attributes.

Rule NameDefault SeverityAuto-fixDescription
no-void-element-contenterror--Disallow content inside void elements (<br>, <img>, etc.)
no-deprecated-elementwarn--Disallow deprecated HTML elements
html-button-has-typewarn--Require type attribute on <button> elements
no-template-target-blankwarn--Disallow target="_blank" without rel="noopener"

A11y (Accessibility)

Accessibility rules based on WAI-ARIA best practices.

Rule NameDefault SeverityAuto-fixDescription
aria-propswarn--Validate aria-* attribute names
no-aria-hidden-on-focusablewarn--Disallow aria-hidden on focusable elements
media-has-captionwarn--Require captions on <audio> and <video>
role-has-required-aria-propswarn--Require ARIA attributes for roles
interactive-supports-focuswarn--Require focusability on interactive elements

...and more accessibility rules (~10 total).

Vapor

Rules specific to Vue Vapor mode.

Rule NameDefault SeverityAuto-fixDescription
no-suspensewarn--Disallow <Suspense> (not supported in Vapor)
no-vue-lifecycle-eventswarn--Disallow Vue 3 lifecycle event hooks (use Vapor equivalents)
no-inline-templatewarn--Disallow inline-template attribute
no-non-vapor-componentswarn--Disallow components incompatible with Vapor mode

Security

Security-focused rules.

Rule NameDefault SeverityAuto-fixDescription
no-v-htmlwarn--Disallow v-html to prevent XSS
no-unsafe-urlwarn--Disallow potentially unsafe URLs (javascript:, data:)

Performance

Rules that detect patterns causing unnecessary re-renders or poor runtime performance.

Rule NameDefault SeverityAuto-fixDescription
no-constant-conditionwarn--Disallow constant expressions in v-if/v-show
no-v-for-index-as-keywarn--Disallow using v-for index as :key

...and more performance-focused rules.

Reactivity

Rules that catch common reactivity mistakes in <script setup>.

Rule NameDefault SeverityAuto-fixDescription
no-ref-as-operanderroryesDisallow using ref values directly in expressions without .value
no-setup-props-reactivity-losswarn--Disallow destructuring props in setup (loses reactivity tracking)

CrossFile

Rules that analyze patterns across multiple files. These require the host to have compiled related files.

Rule NameDefault SeverityAuto-fixDescription
provide-inject-validationwarn--Validate that provide() and inject() calls have matching types across files
deep-composable-trackingwarn--Track deep composable usage patterns for potential issues
no-duplicate-vuewarn--Detect duplicate .vue file names that may cause import conflicts

Preset Contents

Each preset includes a different subset of the above rules:

PresetCategories Included
EssentialVueEssential
RecommendedVueEssential + VueRecommended
AllAll categories, all rules
PerformancePerformance rules only
A11yA11y rules only
StrictVueEssential + VueRecommended + Vue Deprecation + Script (strict subset)

Adding Rule Overrides

Individual rules can be adjusted regardless of the chosen preset. See Configuration for the full .verterrc.json schema and Migrating from ESLint for mapping eslint-plugin-vue rules to their Verter equivalents.

Released under the MIT License.