-
-
Notifications
You must be signed in to change notification settings - Fork 696
feat(attributes-order): add sortLineLength option #2759
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 5cd66bd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
There was a problem hiding this 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 sortLineLength
option to the vue/attributes-order
ESLint rule that allows attributes to be sorted by their line length within the same attribute group. When enabled, shorter attributes come before longer ones, providing an alternative sorting method to the existing alphabetical option.
- Adds
sortLineLength
configuration option to the attributes-order rule - Implements line length comparison logic for attributes within the same position group
- Adds comprehensive test coverage for the new sorting behavior
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
lib/rules/attributes-order.js | Implements the core logic for sorting attributes by line length |
tests/lib/rules/attributes-order.js | Adds comprehensive test cases for the new sortLineLength option |
docs/rules/attributes-order.md | Documents the new option with examples and usage guidelines |
.changeset/social-ghosts-dress.md | Records the feature addition for changelog generation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this 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 🙂
Resolves #2758.