pasika 0.10.5 → 0.10.7
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 +10 -2
- package/package.json +1 -1
|
@@ -2129,6 +2129,13 @@ var supportFolderShapeRule = {
|
|
|
2129
2129
|
return;
|
|
2130
2130
|
}
|
|
2131
2131
|
if (hasDirectExport) return;
|
|
2132
|
+
if (siblingModules.length === 1 && hasAnyReExport) {
|
|
2133
|
+
context.report({
|
|
2134
|
+
node,
|
|
2135
|
+
message: `${folder}/index.ts re-exports exactly one sibling module; define that module's exports directly in index.ts instead. See ${guide}`
|
|
2136
|
+
});
|
|
2137
|
+
return;
|
|
2138
|
+
}
|
|
2132
2139
|
const missing = siblingModules.filter((entry) => {
|
|
2133
2140
|
const stem = entry.replace(/\.(?:[cm]?tsx?|jsx?)$/, "");
|
|
2134
2141
|
return !exportedFiles.has(stem);
|
|
@@ -2869,7 +2876,7 @@ var crossFeatureImportRule = {
|
|
|
2869
2876
|
schema: [],
|
|
2870
2877
|
type: "problem",
|
|
2871
2878
|
docs: {
|
|
2872
|
-
description: "Require non-composition files that import from two or more feature folders to live in src/compositions/."
|
|
2879
|
+
description: "Require non-composition files that import from two or more feature folders other than their own to live in src/compositions/."
|
|
2873
2880
|
}
|
|
2874
2881
|
},
|
|
2875
2882
|
create(context) {
|
|
@@ -2883,6 +2890,7 @@ var crossFeatureImportRule = {
|
|
|
2883
2890
|
const isInApp = fileSegments[0] === "app";
|
|
2884
2891
|
const isConfig = fileSegments[0] === "config";
|
|
2885
2892
|
if (isInCompositions || isInApp || isConfig) return {};
|
|
2893
|
+
const ownFeature = fileSegments[0] === FEATURES_SEGMENT ? fileSegments[1] : void 0;
|
|
2886
2894
|
const importedFeatures = /* @__PURE__ */ new Set();
|
|
2887
2895
|
let alreadyReported = false;
|
|
2888
2896
|
return {
|
|
@@ -2898,7 +2906,7 @@ var crossFeatureImportRule = {
|
|
|
2898
2906
|
}
|
|
2899
2907
|
if (!resolved) return;
|
|
2900
2908
|
const feature = featureNameOf(resolved, sourceRoot);
|
|
2901
|
-
if (feature) importedFeatures.add(feature);
|
|
2909
|
+
if (feature !== void 0 && feature !== ownFeature) importedFeatures.add(feature);
|
|
2902
2910
|
if (importedFeatures.size >= 2) {
|
|
2903
2911
|
alreadyReported = true;
|
|
2904
2912
|
const names = [...importedFeatures].sort().join(", ");
|