pasika 0.10.80 → 0.10.81
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.
|
@@ -7035,7 +7035,7 @@ var rootSupportPlacementRule = {
|
|
|
7035
7035
|
schema: [],
|
|
7036
7036
|
type: "problem",
|
|
7037
7037
|
docs: {
|
|
7038
|
-
description: "Require
|
|
7038
|
+
description: "Require zero-consumer or app-only support-folder exports to live under a feature folder, not root or elsewhere."
|
|
7039
7039
|
}
|
|
7040
7040
|
},
|
|
7041
7041
|
create(context) {
|
|
@@ -7059,10 +7059,16 @@ var rootSupportPlacementRule = {
|
|
|
7059
7059
|
for (const exp of module.exports) {
|
|
7060
7060
|
if (exp.kind !== expectedKind) continue;
|
|
7061
7061
|
const consumers = [...index.symbolConsumers.get(symbolKey(file, exp.name)) ?? []];
|
|
7062
|
-
|
|
7062
|
+
const where = isRoot ? `root src/${supportFolder}/` : `src/${folderSegments.join("/")}/`;
|
|
7063
|
+
if (consumers.length === 0) {
|
|
7064
|
+
findings.push({
|
|
7065
|
+
line: exp.line,
|
|
7066
|
+
message: `${label} "${exp.name}" has no consumers, so it has not earned ${where}; move it into the feature it represents (src/features/<feature>/${supportFolder}/), or remove it if it is unused. See ${doc}`
|
|
7067
|
+
});
|
|
7068
|
+
continue;
|
|
7069
|
+
}
|
|
7063
7070
|
const outsideApp = consumers.filter((consumer) => isPlacingConsumer(consumer, sourceRoot));
|
|
7064
7071
|
if (outsideApp.length > 0) continue;
|
|
7065
|
-
const where = isRoot ? `root src/${supportFolder}/` : `src/${folderSegments.join("/")}/`;
|
|
7066
7072
|
findings.push({
|
|
7067
7073
|
line: exp.line,
|
|
7068
7074
|
message: `${label} "${exp.name}" is consumed only from src/app/, so it has not earned ${where}; move it into the feature it represents (src/features/<feature>/${supportFolder}/). If no existing feature applies, introduce a new feature folder. See ${doc}`
|