Skip to content
On this page

vue/no-unused-properties

disallow unused properties

📖 Rule Details

This rule is aimed at eliminating unused properties.

Note

This rule cannot be checked for use in other components (e.g. mixins, Property access via $refs) and use in places where the scope cannot be determined.

Now loading...
Now loading...

🔧 Options

json
{
  "vue/no-unused-properties": ["error", {
    "groups": ["props"],
    "deepData": false,
    "ignorePublicMembers": false
  }]
}
  • groups (string[]) Array of groups to search for properties. Default is ["props"]. The value of the array is some of the following strings:
    • "props"
    • "data"
    • "computed"
    • "methods"
    • "setup"
  • deepData (boolean) If true, the object of the property defined in data will be searched deeply. Default is false. Include "data" in groups to use this option.
  • ignorePublicMembers (boolean) If true, members marked with a JSDoc /** @public */ tag will be ignored. Default is false.

"groups": ["props", "data"]

Now loading...
Now loading...

{ "groups": ["props", "data"], "deepData": true }

Now loading...

"groups": ["props", "computed"]

Now loading...
Now loading...

{ "groups": ["props", "methods"], "ignorePublicMembers": true }

Now loading...

🚀 Version

This rule was introduced in eslint-plugin-vue v7.0.0

🔍 Implementation