Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
create (context) {
return VueUtils.defineTemplateBodyVisitor(context, {
"VElement" (node) {
const options = context.options[0] || {};
const elementOptions = options.elements || DEFAULT_ELEMENTS;
const type = utils.getElementType(node);
const distractingElement = elementOptions.find(element => type === element);
if (distractingElement) {
context.report({
node,
message: errorMessage(distractingElement),
});
}
}
}, altRule.create(context))
}
};