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(no-duplicate-attr-inheritance): ignore multi root#2598

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

Merged
ota-meshi merged 7 commits intovuejs:masterfromwaynzh:feature/ignore-multi-root
Nov 27, 2024

Conversation

waynzh
Copy link
Member

resolve#2596.

  • since this will result in fewer errors, should we still consider adding an option to control this?
  • multi root could also be a group ofv-if /v-else /v-else nodes. Should we consider treating it as a "single" root?

@FloEdelmann
Copy link
Member

  • since this will result in fewer errors, should we still consider adding an option to control this?

I think it would make sense to add a newcheckMultiRootNodes option (false by default).

  • multi root could also be a group ofv-if /v-else /v-else nodes. Should we consider treating it as a "single" root?

How does Vue itself behave here?

@waynzh
Copy link
MemberAuthor

waynzh commentedNov 10, 2024
edited
Loading

add a newcheckMultiRootNodes option (false by default).

WhencheckMultiRootNodes is set totrue, this rule will ignore the multi root nodes error. Perhaps we could consider renaming it to something likeignoreMultiRootNodes?

How does Vue itself behave here?

Vue treats a group of v-if / v-else-if/v-else as a single node. I've added anisConditionalGroup function to do that.

@FloEdelmann
Copy link
Member

WhencheckMultiRootNodes is set totrue, this rule will ignore the multi root nodes error. Perhaps we could consider renaming it to something likeignoreMultiRootNodes?

Sorry, my suggestion was not clear enough. I'd say the rule should stop reporting errors for components with multiple root nodes by default. But the old behavior should still be available (for users who want to explicitly define the behavior for multi-root components) via an option. IscheckMultiRootNodes a good name for that? Do you have a better suggestion?

@waynzh
Copy link
MemberAuthor

the rule should stop reporting errors for components with multiple root nodes by default

Then the name and setting the default tofalse make sense to me. I've updated the test cases and docs.

waynzhand others added2 commitsNovember 13, 2024 20:28
Co-authored-by: Flo Edelmann <git@flo-edelmann.de>
@@ -26,11 +26,12 @@ export default {
/* ✓ GOOD */
inheritAttrs: false
}
</script>
Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

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.

Looks good to me now. Thanks for your work!

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! Thank you!

@ota-meshiota-meshienabled auto-merge (squash)November 27, 2024 05:53
@ota-meshiota-meshi merged commit86a8138 intovuejs:masterNov 27, 2024
18 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@FloEdelmannFloEdelmannFloEdelmann approved these changes

@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.

no-duplicate-attr-inheritance: should ignore components with multiple root nodes?
3 participants
@waynzh@FloEdelmann@ota-meshi

[8]ページ先頭

©2009-2025 Movatter.jp