@hero-design/snowflake-guard
Version:
A hero-design bot detecting snowflake usage
13 lines (12 loc) • 447 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const reportClassName = (attributes) => {
const classNameAttr = attributes.find((attr) => attr.type === 'JSXAttribute' &&
attr.name.type === 'JSXIdentifier' &&
attr.name.name === 'className');
if (classNameAttr && classNameAttr.loc) {
return classNameAttr.loc.start.line;
}
return undefined;
};
exports.default = reportClassName;