src/content/docs/linter/rules/use-vue-valid-v-pre.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="HTML" icon="seti:html"> :::caution This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. ::: ## Summary - Rule available since: `v2.3.11` - Diagnostic Category: [`lint/nursery/useVueValidVPre`](/reference/diagnostics#diagnostic-category) - This rule has an [**unsafe**](/linter/#unsafe-fixes) fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - This rule belongs to the following domains: - [`vue`](/linter/domains#vue) - Sources: - Same as [`vue/valid-v-pre`](https://eslint.vuejs.org/rules/valid-v-pre){
"linter": {
"rules": {
"nursery": {
"useVueValidVPre": "error"
}
}
}
}
Enforce valid v-pre Vue directives.
This rule reports v-pre directives in the following cases:
The directive has an argument so it is invalid.
<div v-pre:arg></div>
The directive has a modifier so it is invalid.
<div v-pre.mod></div>
The directive has a value so it is invalid.
<div v-pre="value"></div>
<div v-pre></div>