pasika 0.10.5 → 0.10.6
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.
|
@@ -2869,7 +2869,7 @@ var crossFeatureImportRule = {
|
|
|
2869
2869
|
schema: [],
|
|
2870
2870
|
type: "problem",
|
|
2871
2871
|
docs: {
|
|
2872
|
-
description: "Require non-composition files that import from two or more feature folders to live in src/compositions/."
|
|
2872
|
+
description: "Require non-composition files that import from two or more feature folders other than their own to live in src/compositions/."
|
|
2873
2873
|
}
|
|
2874
2874
|
},
|
|
2875
2875
|
create(context) {
|
|
@@ -2883,6 +2883,7 @@ var crossFeatureImportRule = {
|
|
|
2883
2883
|
const isInApp = fileSegments[0] === "app";
|
|
2884
2884
|
const isConfig = fileSegments[0] === "config";
|
|
2885
2885
|
if (isInCompositions || isInApp || isConfig) return {};
|
|
2886
|
+
const ownFeature = fileSegments[0] === FEATURES_SEGMENT ? fileSegments[1] : void 0;
|
|
2886
2887
|
const importedFeatures = /* @__PURE__ */ new Set();
|
|
2887
2888
|
let alreadyReported = false;
|
|
2888
2889
|
return {
|
|
@@ -2898,7 +2899,7 @@ var crossFeatureImportRule = {
|
|
|
2898
2899
|
}
|
|
2899
2900
|
if (!resolved) return;
|
|
2900
2901
|
const feature = featureNameOf(resolved, sourceRoot);
|
|
2901
|
-
if (feature) importedFeatures.add(feature);
|
|
2902
|
+
if (feature !== void 0 && feature !== ownFeature) importedFeatures.add(feature);
|
|
2902
2903
|
if (importedFeatures.size >= 2) {
|
|
2903
2904
|
alreadyReported = true;
|
|
2904
2905
|
const names = [...importedFeatures].sort().join(", ");
|