Skip to content

useVueValidVCloak

biome.json
{
"linter": {
"rules": {
"correctness": {
"useVueValidVCloak": "error"
}
}
}
}

Enforce valid v-cloak Vue directives.

This rule reports v-cloak directives in the following cases:

  • The directive has an argument. E.g. <div v-cloak:aaa></div>
  • The directive has any modifiers. E.g. <div v-cloak.bbb></div>
  • The directive has an attribute value. E.g. <div v-cloak="foo"></div>
<div v-cloak:arg></div>
code-block.vue:1:13 lint/correctness/useVueValidVCloak  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The v-cloak directive must not have an argument.

> 1 │ <div v-cloak:arg></div>
^^^^
2 │

Use v-cloak without arguments, e.g. v-cloak.

Unsafe fix: Remove the argument.

1 │ <div·v-cloak:arg></div>
----
<div v-cloak.mod></div>
code-block.vue:1:13 lint/correctness/useVueValidVCloak  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The v-cloak directive does not support modifiers.

> 1 │ <div v-cloak.mod></div>
^^^^
2 │

Remove the modifier; v-cloak is a stand-alone control directive.

Unsafe fix: Remove the modifier.

1 │ <div·v-cloak.mod></div>
----
<div v-cloak="value"></div>
code-block.vue:1:13 lint/correctness/useVueValidVCloak  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The v-cloak directive must not have a value.

> 1 │ <div v-cloak=“value”></div>
^^^^^^^^
2 │

v-cloak is a boolean-like directive and should be used without a value.

Unsafe fix: Remove the value.

1 │ <div·v-cloak=value></div>
--------
<div v-cloak></div>