Skip to content

vue/no-unused-property false positive with camelCase v-bind same-name shorthand #2370

Closed
@M1CK431

Description

@M1CK431

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: 8.56.0
  • eslint-plugin-vue version: 9.20.1
  • Vue version: 3.4.13
  • Node version: 21.5.0
  • Operating System: Archlinux

Please show your full configuration:

/* eslint-env node */
module.exports = {
  root: true,
  env: { node: true, es2022: true },
  parserOptions: { ecmaVersion: "latest" },
  plugins: ["prettier"],
  extends: [
    "plugin:vue/vue3-strongly-recommended",
    "eslint:recommended",
    "./.eslintrc-auto-import.json",
    "plugin:prettier/recommended"
  ],
  overrides: [
    {
      files: ["*.graphql", "*.gql"],
      parser: "@graphql-eslint/eslint-plugin",
      plugins: ["@graphql-eslint"],
      rules: {
        "@graphql-eslint/no-duplicate-fields": "error"
      }
    }
  ],
  rules: {
    "prettier/prettier": [
      "warn",
      { trailingComma: "none", arrowParens: "avoid" }
    ],
    "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
    "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
    "no-setter-return": "off",
    "no-empty": ["error", { allowEmptyCatch: true }],

    "vue/multi-word-component-names": "off",
    "vue/no-reserved-component-names": "off",
    "vue/max-attributes-per-line": "off",
    "vue/no-template-shadow": "off",
    "vue/one-component-per-file": "off",
    "vue/require-explicit-emits": "off",
    "vue/singleline-html-element-content-newline": "off",
    "vue/require-default-prop": "off",
    "vue/v-on-event-hyphenation": ["error", "never"],
    "vue/component-tags-order": [
      "warn",
      { order: ["template", "script", "style"] }
    ],
    "vue/no-lone-template": "warn",
    "vue/order-in-components": "warn",
    "vue/this-in-template": "error",
    "vue/block-tag-newline": "warn",
    "vue/component-name-in-template-casing": [
      "warn",
      "PascalCase",
      {
        registeredComponentsOnly: false,
        ignores: ["component", "transition", "fa"]
      }
    ],
    "vue/component-options-name-casing": "warn",
    "vue/custom-event-name-casing": "error",
    "vue/no-empty-component-block": "warn",
    "vue/no-ref-object-destructure": "error",
    "vue/no-required-prop-with-default": "warn",
    "vue/no-template-target-blank": "error",
    "vue/no-this-in-before-route-enter": "error",
    "vue/no-unsupported-features": ["error", { version: "^3.4.0" }],
    "vue/no-unused-properties": "warn",
    "vue/no-unused-refs": "warn",
    "vue/no-useless-mustaches": "warn",
    "vue/no-useless-v-bind": "warn",
    "vue/padding-line-between-blocks": "warn",
    "vue/prefer-separate-static-class": "error",
    "vue/prefer-true-attribute-shorthand": "warn",
    "vue/v-for-delimiter-style": "warn",
    "vue/attribute-hyphenation": ["warn", "never"]
  }
};

What did you do?

<template><div :tuut /></template>

<script>export default { props: { tuut: String } }</script>

What did you expect to happen?
No EsLint warning about "unused" tuut prop

What actually happened?

warning 'tuut' of property found, but never used vue/no-unused-properties

Repository to reproduce this issue

https://github.com/vuejs/eslint-plugin-vue
Don't be evil, it's not always needed 🙄

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy