Skip to content

Commit 8476b47

Browse files
committed
fix(no-unused-class-name): added support for pseudo-classes
1 parent d8ed1a6 commit 8476b47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rules/no-unused-class-name.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ function findClassesInSelector(node: SelectorNode): string[] {
109109
if (node.type === "class") {
110110
return [node.value]
111111
}
112-
if (node.type === "root" || node.type === "selector") {
112+
if (
113+
node.type === "pseudo" ||
114+
node.type === "root" ||
115+
node.type === "selector"
116+
) {
113117
return node.nodes.flatMap(findClassesInSelector)
114118
}
115119
return []

0 commit comments

Comments
 (0)