Skip to content

Commit 66e17c2

Browse files
committed
chore(no-unused-class-name): updated the rule to use the new StyleContext
1 parent c31afeb commit 66e17c2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ export default createRule("no-unused-class-name", {
4141
},
4242
"Program:exit"() {
4343
const styleContext = context.parserServices.getStyleContext()
44-
if (
45-
// There is a style element, but it couldn't be parsed
46-
styleContext.sourceLang !== null &&
47-
styleContext.sourceAst === null
48-
) {
44+
if (["parse-error", "unknown-lang"].includes(styleContext.status)) {
4945
return
5046
}
5147
const classesUsedInStyle =

0 commit comments

Comments
 (0)