mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.
This commit is contained in:
@@ -12,7 +12,7 @@ export function readLoggingConfig(): LoggingConfig | undefined {
|
||||
try {
|
||||
if (!fs.existsSync(configPath)) return undefined;
|
||||
const raw = fs.readFileSync(configPath, "utf-8");
|
||||
const parsed = json5.parse(raw) as Record<string, unknown>;
|
||||
const parsed = json5.parse(raw);
|
||||
const logging = parsed?.logging;
|
||||
if (!logging || typeof logging !== "object" || Array.isArray(logging)) return undefined;
|
||||
return logging as LoggingConfig;
|
||||
|
||||
@@ -187,8 +187,8 @@ function logToFile(
|
||||
meta?: Record<string, unknown>,
|
||||
) {
|
||||
if (level === "silent") return;
|
||||
const safeLevel = level as Exclude<LogLevel, "silent">;
|
||||
const method = (fileLogger as unknown as Record<string, unknown>)[safeLevel] as unknown as
|
||||
const safeLevel = level;
|
||||
const method = (fileLogger as unknown as Record<string, unknown>)[safeLevel] as
|
||||
| ((...args: unknown[]) => void)
|
||||
| undefined;
|
||||
if (typeof method !== "function") return;
|
||||
|
||||
Reference in New Issue
Block a user