Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function create(context) {
const selectedCase = context.options[0];
const caseType =
allowedCaseOptions.indexOf(selectedCase) !== -1 ? selectedCase : allowedCaseOptions[0];
const converter = casing.getConverter(caseType);
return utils.executeOnVue(context, obj => {
const node = obj.properties.find(
p =>
p.type === 'Property' &&
p.key.type === 'Identifier' &&
p.key.name === 'components' &&
p.value.type === 'ObjectExpression'
);
if (!node) {
return;
}
const items = node.value.properties;
for (const item of items) {