@starci/eslint-canon-fe 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/class-names.mjs +2 -1
- package/package.json +1 -1
package/class-names.mjs
CHANGED
|
@@ -11,7 +11,8 @@ const isCn = (node) => node?.type === "Identifier" && node.name === "cn"
|
|
|
11
11
|
|
|
12
12
|
const importedClassNames = (context) => {
|
|
13
13
|
const imports = new Set()
|
|
14
|
-
|
|
14
|
+
const sourceCode = context.sourceCode || context.getSourceCode()
|
|
15
|
+
for (const statement of sourceCode.ast.body) {
|
|
15
16
|
if (statement.type !== "ImportDeclaration" || statement.source.value !== "./classNames") continue
|
|
16
17
|
for (const specifier of statement.specifiers) imports.add(specifier.local.name)
|
|
17
18
|
}
|
package/package.json
CHANGED