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

feat(component-api-style): add scriptSetupVapor option#2797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
waynzh wants to merge4 commits intomaster
base:master
Choose a base branch
Loading
fromfeature/vapor

Conversation

@waynzh
Copy link
Member

@waynzhwaynzh commentedJul 17, 2025
edited
Loading

resolve#2791

Waiting for the official release of Vue 3.6...

@changeset-bot
Copy link

changeset-botbot commentedJul 17, 2025
edited
Loading

🦋 Changeset detected

Latest commit:adf9424

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
eslint-plugin-vueMinor

Not sure what this means?Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@waynzhwaynzh requested a review fromCopilotJuly 17, 2025 11:45
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

Introduce a newscript-setup-vapor option to the Vue component API style rule, allowing<script setup vapor> blocks and enforcing the proper messages when it’s disallowed.

  • Extend parser and rule logic to recognize and validatescript-setup-vapor
  • Add unit tests for both allowing and disallowing<script setup vapor>
  • Update documentation with examples and option descriptions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

FileDescription
tests/lib/rules/component-api-style.jsAdded tests for the newscript-setup-vapor option and errors
lib/rules/component-api-style.jsParsed, flagged, and reported on<script setup vapor> usage
docs/rules/component-api-style.mdDocumented thescript-setup-vapor option with examples
Comments suppressed due to low confidence (1)

tests/lib/rules/component-api-style.js:124

  • Add a test case for<script setup> (withoutvapor attribute) when bothscript-setup andscript-setup-vapor options are enabled to ensure no error is reported.
      options: [['script-setup', 'script-setup-vapor']]

Copy link
Member

@ota-meshiota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM! Thanks!

Copy link
Member

@FloEdelmannFloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The code looks good to me 🙂

Unfortunately, this new option will not solve the request in#2791 ("detect components using<script setup> and suggest adding thevapor attribute when possible"). Should this be a new rule instead? Or a new additional rule, while first only allowingscript-setup-vapor here?

@waynzh
Copy link
MemberAuthor

this new option will not solve the request in#2791

Users setting['script-setup-vapor'] likethis should resolve the issue, right?
The error message will suggest: "Use<script setup vapor> instead."

@FloEdelmann
Copy link
Member

True, that might work. But you have to migrate everything at once to<script setup vapor>, or decrease the rule severity towarn (but then, also other unwanted styles might creep back in).

@ota-meshi
Copy link
Member

To implement that, I think we need to check whether it's safe to assign thevapor attribute. I don't know how to do that 🤔
Do you know how to check that?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@FloEdelmannFloEdelmannFloEdelmann left review comments

Copilot code reviewCopilotCopilot left review comments

@ota-meshiota-meshiota-meshi approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Rule proposal: vue/prefer-vapor-mode

4 participants

@waynzh@FloEdelmann@ota-meshi

[8]ページ先頭

©2009-2025 Movatter.jp