Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
eslintPluginVueUtils.executeOnVue(context, obj => {
unusedProperties = Array.from(
eslintPluginVueUtils.iterateProperties(obj, new Set([GROUP_METHODS]))
);
remove(unusedProperties, property => {
return (
thisExpressionsVariablesNames.includes(property.name) ||
befoureRouteEnterInstanceProperties.includes(property.name) ||
watchStringMethods.includes(property.name)
);
});
if (!hasTemplate && unusedProperties.length) {
utils.reportUnusedProperties(context, unusedProperties, disabledLines);
}
})
);
getWatchersNames(obj) {
const watchers = Array.from(
eslintPluginVueUtils.iterateProperties(obj, new Set([GROUP_WATCH]))
);
return watchers.map(watcher => watcher.name);
},
eslintPluginVueUtils.executeOnVue(context, obj => {
definitionNodes = Array.from(
eslintPluginVueUtils.iterateProperties(obj, new Set([GROUP_$TRS]))
);
if (!hasTemplate) {
utils.reportUnusedTranslations(context, definitionNodes, usedStrings);
}
})
);
eslintPluginVueUtils.executeOnVue(context, obj => {
unusedProperties = Array.from(
eslintPluginVueUtils.iterateProperties(
obj,
new Set([GROUP_PROPS, GROUP_DATA, GROUP_COMPUTED])
)
);
const watchersNames = utils.getWatchersNames(obj);
remove(unusedProperties, property => {
return (
thisExpressionsVariablesNames.includes(property.name) ||
befoureRouteEnterInstanceProperties.includes(property.name) ||
watchersNames.includes(property.name)
);
});
if (!hasTemplate && unusedProperties.length) {