Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const componentOptions = options.components || [];
const typeCheck = ['a'].concat(componentOptions);
const parent = node.parent;
const nodeType = utils.getElementType(parent);
if (typeCheck.indexOf(nodeType) === -1) {
return;
} else if (utils.hasAccessibleChild(parent)) {
return;
}
context.report({
node,
message: errorMessage,
});
}
}, anchorRule.create(context))
}
}