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

fix(vue/no-duplicate-class-names): improve non-intersecting conditions and combining parents#2980

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
FloEdelmann merged 4 commits intovuejs:masterfromYizack:fix/combining-parents
Nov 27, 2025

Conversation

@Yizack
Copy link
Contributor

@YizackYizack commentedNov 26, 2025
edited
Loading

This PRfixes#2974 and adds its respective test case

Also added additional tests for edge cases with combining parents including:

  • Non-intersecting conditions with nested objects
  • Binary expressions within logical expressions
  • Template literals within logical expressions

andreww2012 reacted with heart emoji
@changeset-bot
Copy link

changeset-botbot commentedNov 26, 2025
edited
Loading

🦋 Changeset detected

Latest commit:791d65e

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

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

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

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.

Nice, thank you for the quick fix! 🙂

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

This PR fixes issue#2974 by improving duplicate class name detection in thevue/no-duplicate-class-names rule. The fix addresses false positives when class names appear in non-intersecting conditional expressions, while correctly detecting duplicates within combining expressions (BinaryExpression and TemplateLiteral).

Key Changes:

  • AddedparentExpr parameter tracking to identify the parent expression context for each class name
  • Modified LogicalExpression handling to mark the right side as always conditional (unconditional=false)
  • Enhanced duplicate detection logic to consider class names in different LogicalExpressions as non-intersecting (not duplicates) unless one is unconditional or they share the same combining parent

Reviewed changes

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

FileDescription
lib/rules/no-duplicate-class-names.jsImplements parent expression tracking throughoutextractClassNodes function and updates duplicate detection logic to distinguish between non-intersecting conditions and combining expressions
tests/lib/rules/no-duplicate-class-names.jsAdds comprehensive test coverage for non-intersecting conditions (nested objects, multiple logical expressions, binary in logical) and duplicate detection in combining expressions (binary and template literals within logical expressions)
.changeset/major-planes-fly.mdDocuments the patch fix for false positives in non-intersecting conditions and improved duplicate detection in combining expressions

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

@FloEdelmann
Copy link
Member

I'll merge this and release another patch version, but feel free to review this after merging@ota-meshi and@waynzh!

@FloEdelmannFloEdelmann merged commitbd4abe5 intovuejs:masterNov 27, 2025
21 checks passed
@github-actionsgithub-actionsbot mentioned this pull requestNov 27, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@FloEdelmannFloEdelmannFloEdelmann approved these changes

@ota-meshiota-meshiAwaiting requested review from ota-meshi

@waynzhwaynzhAwaiting requested review from waynzh

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-class-names: reports on the same class names applied under non-intersecting conditions

2 participants

@Yizack@FloEdelmann

[8]ページ先頭

©2009-2025 Movatter.jp