chore: enable consistent-return

This commit is contained in:
Peter Steinberger
2026-04-10 20:56:08 +01:00
parent bc27278d6d
commit 0ebeee8b0d
68 changed files with 223 additions and 107 deletions

View File

@@ -192,6 +192,7 @@ function resolveBundledManifestPluginIdsForContract(contract: ManifestContractKe
case "tools":
return entry.toolNames.length > 0;
}
throw new Error("Unsupported manifest contract key");
})
.map((entry) => entry.pluginId),
).toSorted((left, right) => left.localeCompare(right));

View File

@@ -665,6 +665,7 @@ describe("discoverOpenClawPlugins", () => {
packageName: "@openclaw/missing-entry-pack",
extensions: ["./missing.ts"],
});
return true;
},
},
{
@@ -688,6 +689,7 @@ describe("discoverOpenClawPlugins", () => {
packageName: "@openclaw/pack",
extensions: ["./linked/escape.ts"],
});
return true;
},
},
{
@@ -718,6 +720,7 @@ describe("discoverOpenClawPlugins", () => {
packageName: "@openclaw/pack",
extensions: ["./escape.ts"],
});
return true;
},
},
] as const)("$name", async ({ setup, expectedDiagnostic, expectedId }) => {

View File

@@ -250,6 +250,7 @@ function marketplaceEntrySourceToInput(source: MarketplaceEntrySource): string {
case "url":
return source.url;
}
throw new Error("Unsupported marketplace entry source");
}
function parseMarketplaceManifest(

View File

@@ -22,6 +22,7 @@ function scopeRank(scope: typeof pluginRegistryLoaded): number {
case "all":
return 3;
}
throw new Error("Unsupported plugin registry scope");
}
function activeRegistrySatisfiesScope(
@@ -50,6 +51,7 @@ function activeRegistrySatisfiesScope(
case "all":
return false;
}
throw new Error("Unsupported plugin registry scope");
}
export function ensurePluginRegistryLoaded(options?: {