mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-13 02:01:16 +00:00
chore: enable consistent-return
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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 }) => {
|
||||
|
||||
@@ -250,6 +250,7 @@ function marketplaceEntrySourceToInput(source: MarketplaceEntrySource): string {
|
||||
case "url":
|
||||
return source.url;
|
||||
}
|
||||
throw new Error("Unsupported marketplace entry source");
|
||||
}
|
||||
|
||||
function parseMarketplaceManifest(
|
||||
|
||||
@@ -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?: {
|
||||
|
||||
Reference in New Issue
Block a user