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.
🔧 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
) Iftrue
, the object of the property defined indata
will be searched deeply. Default isfalse
. Include"data"
ingroups
to use this option.ignorePublicMembers
(boolean
) Iftrue
, members marked with a JSDoc/** @public */
tag will be ignored. Default isfalse
.
"groups": ["props", "data"]
{ "groups": ["props", "data"], "deepData": true }
"groups": ["props", "computed"]
{ "groups": ["props", "methods"], "ignorePublicMembers": true }
🚀 Version
This rule was introduced in eslint-plugin-vue v7.0.0