Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
) {
preferred = strictNativeType;
invalidTypes.push([nodeName, preferred]);
break;
}
}
}
// For fixer
if (preferred) {
adjustNames(type, preferred, isGenericMatch, nodeName, node, parentNode);
}
});
if (invalidTypes.length) {
const fixedType = publish(typeAst);
const tagName = jsdocTag.tag;
invalidTypes.forEach(([badType, preferredType = '', message]) => {
const fix = (fixer) => {
return fixer.replaceText(
jsdocNode,
sourceCode.getText(jsdocNode).replace(
`{${jsdocTag.type}}`,
`{${fixedType}}`,
),
);
};
const tagValue = jsdocTag.name ? ` "${jsdocTag.name}"` : '';
report(