Skip to content

useVueVapor

  • Rule available since: v2.3.11
  • Diagnostic Category: lint/performance/useVueVapor
  • This rule isn’t recommended, so you need to enable it.
  • This rule has an unsafe fix.
  • The default severity of this rule is warning.
  • This rule belongs to the following domains:
biome.json
{
"linter": {
"rules": {
"performance": {
"useVueVapor": "error"
}
}
}
}

Enforce opting in to Vue Vapor mode in <script setup> blocks.

Vue 3.6 introduces an opt-in “Vapor mode” for SFC <script setup> blocks: <script setup vapor>.

Vapor mode only works for Vue Single File Components (SFCs) using <script setup>.

This rule reports <script setup> opening tags that are missing the vapor attribute.

<script setup>
</script>
code-block.vue:1:1 lint/performance/useVueVapor  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This <script setup> is missing the vapor attribute.

> 1 │ <script setup>
^^^^^^^^^^^^^^
2 │ </script>
3 │

Add vapor to opt in to Vue Vapor mode: <script setup vapor>.

Unsafe fix: Add the vapor attribute.

1 │ <script·setup·vapor>
++++++
<script setup vapor>
</script>
  • noVueOptionsApi: Disallows the Options API format, which is incompatible with Vapor Mode