chore(lint): enable readability lint rules

This commit is contained in:
Peter Steinberger
2026-05-31 07:17:44 +01:00
parent 0211a3aa9f
commit deb7bc6539
373 changed files with 766 additions and 825 deletions

View File

@@ -85,7 +85,7 @@ function resolveGatewayPortFallback(): Promise<number> {
async function assertUnmanagedGatewayRestartEnabled(port: number): Promise<void> {
const cfg = await readBestEffortConfig().catch(() => undefined);
const tlsEnabled = !!cfg?.gateway?.tls?.enabled;
const tlsEnabled = Boolean(cfg?.gateway?.tls?.enabled);
const scheme = tlsEnabled ? "wss" : "ws";
const probe = await probeGateway({
url: `${scheme}://127.0.0.1:${port}`,

View File

@@ -154,10 +154,7 @@ function coerceStatusConfig(value: unknown): OpenClawConfig {
function hasOwnKey(value: unknown, key: string): boolean {
return Boolean(
value &&
typeof value === "object" &&
!Array.isArray(value) &&
Object.prototype.hasOwnProperty.call(value, key),
value && typeof value === "object" && !Array.isArray(value) && Object.hasOwn(value, key),
);
}