Skip to content

feat(attributes-order): add ignoreVBindObject option#3012

Open
waynzh wants to merge 2 commits intomasterfrom
feature/ignoreVBindObject
Open

feat(attributes-order): add ignoreVBindObject option#3012
waynzh wants to merge 2 commits intomasterfrom
feature/ignoreVBindObject

Conversation

@waynzh
Copy link
Member

@waynzh waynzh commented Jan 22, 2026

Resolve #2999

Currently, v-bind="object" is only excluded from sorting checks when adjacent to ATTR_DYNAMIC.

Propose adding a new boolean option, ignoreVBindObject, to allow developers to globally exclude v-bind="object" from sorting checks, regardless of its position(skipped both near ATTR_DYNAMIC and EVENT).

@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2026

🦋 Changeset detected

Latest commit: e6f5067

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

Copy link
Contributor

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 ignoreVBindObject option to the vue/attributes-order rule, allowing developers to exclude v-bind="object" (spread binding) from attribute order checking. This addresses use cases where spread binding must be positioned strategically to control event handler execution order in Vue components.

Changes:

  • Added ignoreVBindObject boolean option to rule schema with default value false
  • Implemented filtering logic to exclude v-bind="object" from ordering checks when option is enabled
  • Fixed minor typo in comment (removed extra space in v-bind ="object")

Reviewed changes

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

File Description
lib/rules/attributes-order.js Added option parsing, filtering logic, schema definition, and fixed comment typo
tests/lib/rules/attributes-order.js Added 2 valid test cases and 2 invalid test cases to verify option behavior
docs/rules/attributes-order.md Added documentation section explaining the new option with example
.changeset/dark-cars-shake.md Added changeset for minor version bump

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

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!

@@ -0,0 +1,5 @@
---
'eslint-plugin-vue': minor
Copy link
Member

Choose a reason for hiding this comment

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

Please don't merge this yet, I'd like to release a patch version first.

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.

vue/attributes-order: add option to ignore v-bind="object" (attribute spread) from ordering/fixing

2 participants