Skip to content

Conversation

Yizack
Copy link

@Yizack Yizack commented Sep 9, 2025

resolves #2932

Copy link

changeset-bot bot commented Sep 9, 2025

🦋 Changeset detected

Latest commit: fde5af0

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

This PR includes changesets to release 1 package
Name Type
eslint-plugin-vue Minor

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

@Yizack
Copy link
Author

Yizack commented Sep 10, 2025

I believe this rule is now ready!

Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! Sorry that reviewing took so long. I only have a few small suggestions/requests; in general the code looks really good! 🙂

@Yizack
Copy link
Author

Yizack commented Oct 15, 2025

Thanks for your contribution! Sorry that reviewing took so long. I only have a few small suggestions/requests; in general the code looks really good! 🙂

Hi! No problem, thanks for the review 🙂, I just applied your suggestions and requests

@Yizack Yizack requested a review from FloEdelmann October 15, 2025 15:06
Copy link
Member

@FloEdelmann FloEdelmann 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 🙂
Thank you! 🥳

Copy link
Contributor

@Copilot Copilot AI 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 adds a new ESLint rule vue/no-duplicate-class-names that detects and automatically fixes duplicate class names in Vue template class attributes and directives.

Key changes:

  • Implements comprehensive duplicate class detection across static attributes, dynamic bindings, arrays, objects, conditionals, and binary expressions
  • Provides automatic fixing that preserves original spacing when removing duplicates
  • Detects duplicates both within single attributes and across static/dynamic class attributes

Reviewed Changes

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

Show a summary per file
File Description
lib/rules/no-duplicate-class-names.js Core rule implementation with duplicate detection logic and auto-fix functionality
tests/lib/rules/no-duplicate-class-names.js Comprehensive test suite covering valid/invalid cases and various class binding patterns
lib/index.js Registers the new rule in the plugin's rule index
docs/rules/no-duplicate-class-names.md User-facing documentation with examples and usage guidance
docs/rules/index.md Updates rule listing to include the new rule
.changeset/ten-lines-fail.md Changelog entry for the new feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rule proposal: vue/no-duplicate-class-names

2 participants