Skip to content

Support v-bind same name shorthand #2355

Closed
@beefchimi

Description

@beefchimi

What rule do you want to change?

Does this change cause the rule to produce more or fewer warnings?

How will the change be implemented? (New option, new default behavior, etc.)?

  • I think we simply need to update the rule to allow shorthand props.

Please provide some example code that this change will affect:

<SomeComponent :disabled :custom />

What does the rule currently do for this code?

  • Currently, using shorthand will produce the following error:

screen

What will the rule do after it's changed?

  • No longer complain when a valid shorthand syntax is used.

Additional context

  • Attempted using the shorthand syntax in a project with the following dependencies:
"dependencies": {
  "vue": "^3.4.5"
},
"devDependencies": {
  "@rushstack/eslint-patch": "^1.6.1",
  "@tsconfig/node20": "^20.1.2",
  "@types/node": "^20.10.6",
  "@vitejs/plugin-vue": "^5.0.2",
  "@vue/eslint-config-prettier": "^9.0.0",
  "@vue/eslint-config-typescript": "^12.0.0",
  "@vue/tsconfig": "^0.5.1",
  "eslint": "^8.56.0",
  "eslint-plugin-vue": "^9.19.2",
  "lightningcss": "^1.22.1",
  "npm-run-all2": "^6.1.1",
  "prettier": "^3.1.1",
  "typescript": "^5.3.3",
  "vite": "^5.0.10",
  "vite-plugin-svg-sprite": "^0.5.1",
  "vue-tsc": "^1.8.27"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions