pasika 0.10.86 → 0.10.87
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/dist/eslint/pasika/index.js +14 -10
- package/package.json +1 -1
|
@@ -844,17 +844,21 @@ function componentFacadeTarget(context, filename) {
|
|
|
844
844
|
if (statements.length === 0 || statements.some((node) => node.type !== "ExportNamedDeclaration" || !node.source)) {
|
|
845
845
|
return void 0;
|
|
846
846
|
}
|
|
847
|
-
const
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
847
|
+
for (const statement of statements) {
|
|
848
|
+
if (statement.type !== "ExportNamedDeclaration" || typeof statement.source?.value !== "string") continue;
|
|
849
|
+
if (!statement.source.value.startsWith("./")) return void 0;
|
|
850
|
+
const componentFile = path6.resolve(path6.dirname(filename), `${statement.source.value}.tsx`);
|
|
851
|
+
if (!fs2.existsSync(componentFile)) continue;
|
|
852
|
+
const components = parseComponentInfo(fs2.readFileSync(componentFile, "utf8"), componentFile);
|
|
853
|
+
if (components.some(
|
|
854
|
+
({ name }) => statement.specifiers.some(
|
|
855
|
+
(specifier) => specifier.local.type === "Identifier" && specifier.local.name === name
|
|
856
|
+
)
|
|
857
|
+
)) {
|
|
858
|
+
return componentFile;
|
|
859
|
+
}
|
|
851
860
|
}
|
|
852
|
-
|
|
853
|
-
if (!fs2.existsSync(componentFile)) return void 0;
|
|
854
|
-
const components = parseComponentInfo(fs2.readFileSync(componentFile, "utf8"), componentFile);
|
|
855
|
-
return components.some(
|
|
856
|
-
({ name }) => exports.some((specifier) => specifier.local.type === "Identifier" && specifier.local.name === name)
|
|
857
|
-
) ? componentFile : void 0;
|
|
861
|
+
return void 0;
|
|
858
862
|
}
|
|
859
863
|
var applicationStructureRule = {
|
|
860
864
|
meta: {
|