useVueVapor
Summary
Section titled “Summary”- 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:
How to configure
Section titled “How to configure”{ "linter": { "rules": { "performance": { "useVueVapor": "error" } } }}Description
Section titled “Description”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.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”<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>Related Rules
Section titled “Related Rules”- noVueOptionsApi: Disallows the Options API format, which is incompatible with Vapor Mode
Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.