mirror of
https://github.com/bendtherules/eslint-plugin-no-classname-with-stylename.git
synced 2026-08-18 13:53:24 +00:00
Report on className attribute
This commit is contained in:
@@ -42,7 +42,8 @@ module.exports = {
|
||||
const hasStyleName = node.attributes.some((attr) => attr.name.name === "styleName");
|
||||
|
||||
if (hasClassNameWithoutExpr && hasStyleName) {
|
||||
context.report(node, reportText);
|
||||
const nodeAttrClassName = node.attributes.find((attr) => attr.name.name === "className");
|
||||
context.report(nodeAttrClassName, reportText);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user