Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rule proposal: vue/prefer-vapor-mode #2791

Open
@hadarziv-army

Description

@hadarziv-army

Please describe what the rule should do:
This rule should suggest using the newvapor attribute on<script setup> blocks in Vue 3.6+.

Vapor Mode is a new feature introduced in Vue 3.6 (currently in alpha), and this rule helps developers start adopting it early by recommendingvapor where it's appropriate. The behavior of components stays the same, but performance can be improved.

The rule should detect components using<script setup> and suggest adding thevapor attribute when possible.

What category should the rule belong to?
[ ] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[x] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<!-- ❌ This component could use vapor mode, but doesn't--><script setup>defineProps(['msg'])</script><template>  <div>{{ msg }}</div></template>
<!-- ✅ This component uses vapor mode correctly--><script setup vapor>defineProps(['msg'])</script><template>  <div>{{ msg }}</div></template>

Additional context

Vapor Mode was introduced in Vue 3.6, which is currently in alpha.

This rule will become more important once Vue 3.6 is officially released, helping developers adopt the new mode and benefit from improved performance in eligible components.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp