Skip to content

vue/attributes-order false nagative for v-bind="object" #1433

Closed
@ztyzbb

Description

@ztyzbb

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 7.19.0
  • eslint-plugin-vue version: 7.5.0
  • Node version: 14.9.0
  • Operating System: Windows 10 64bit 20H1

Please show your full configuration:

Very long, only related part, I didn't modify this rule individually. So I'm using vue/attributes-order's defalut order

{
  extends: [
    'eslint:recommended',
    'plugin:import/recommended',
    'plugin:promise/recommended',
    'plugin:vue/recommended',
  ]
}

What did you do?

Very long, only related part

<template>
  <pick-table
    ref="pickTable"
    v-model="showPickTable"
    v-bind="pickTableBind"
    @picked="picked"/>
</template>

What did you expect to happen?
No warning

What actually happened?

ESLint reported:
warning Attribute "v-bind" should go before "v-model" vue/attributes-order

Repository to reproduce this issue
I can create one if needed, but I think it's clear enough :)

Where probably wrong
#1391
getPositionFromAttrIndex function
isVAttributeOrVBind() return true for ref attribute, maybe call isVBind() better?
@ota-meshi

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions