Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const nodeType = utils.getElementType(node);
// Only check 'label' elements and custom types.
if (typesToValidate.indexOf(nodeType) === -1) {
return;
}
const required = options.required || { every: ['nesting', 'id'] };
const allowChildren = options.allowChildren || false;
if (!isValid(node, required, allowChildren)) {
context.report({
node,
message: errorMessage,
});
}
}
}, JsxRule.create(context))
}
}