Skip to content

feat(attributes-order): allow attribute names in order - #3222

Open
ValentinYoushkevich wants to merge 2 commits into
vuejs:masterfrom
ValentinYoushkevich:feat/attributes-order-attribute-names
Open

ValentinYoushkevich wants to merge 2 commits into
vuejs:masterfrom
ValentinYoushkevich:feat/attributes-order-attribute-names

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

This lets the order option of vue/attributes-order take plain attribute names next to the group names, either as a separate entry or inside an array, as agreed in #2324. A name matches the attribute and its v-bind form, compared in kebab-case, so row-key also covers :row-key and :rowKey. A matched attribute is placed by its name instead of the group it would otherwise fall into, so ['UNIQUE', 'row-key'] allows row-key before v-model, and ['data-test', 'data-testid'] after OTHER_ATTR keeps test ids at the end. Strings spelled like a group name are still rejected, so a typo like OTHER_ATTRS keeps failing validation, and configs without names behave as before.

Closes #2324, closes #2514

@changeset-bot

changeset-bot Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ecd7a4f

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

…rder-attribute-names

# Conflicts:
#	lib/rules/attributes-order.ts

This branch has not been deployed

No deployments
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.

Make attributes "buckets" configurable vue/attributes-order: keep data-test attribute at the end of inline attributes

1 participant