fix: reduce global eslint warnings (#216)

This commit is contained in:
Eyejoker
2026-06-03 08:30:21 +08:00
committed by GitHub
parent 63a4515241
commit 22602da1ec
7 changed files with 11 additions and 7 deletions

View File

@@ -12,7 +12,6 @@ import path from 'path';
import { CronExpressionParser } from 'cron-parser';
import {
DEFAULT_SCHEDULE_TASK_CONTEXT_MODE,
DEFAULT_TASK_CONTEXT_MODE,
DEFAULT_WATCH_CI_CONTEXT_MODE,
EJCLAW_ENV,
TASK_CONTEXT_MODES,

View File

@@ -153,6 +153,7 @@ export async function runVerificationRequestDirect(
`Failed to parse verification response from ${pathToFileURL(helperPath).href}: ${
error instanceof Error ? error.message : String(error)
}${detail ? `\n${detail}` : ''}`,
{ cause: error },
);
}
}

View File

@@ -1,7 +1,4 @@
import {
DEFAULT_WATCH_CI_CONTEXT_MODE,
WATCH_CI_PROMPT_PREFIX,
} from 'ejclaw-runners-shared';
import { WATCH_CI_PROMPT_PREFIX } from 'ejclaw-runners-shared';
export const DEFAULT_WATCH_CI_INTERVAL_SECONDS = 60;
export const MIN_WATCH_CI_INTERVAL_SECONDS = 30;

View File

@@ -99,7 +99,9 @@ export function restartStackServices(
throw error;
}
if (managedServiceCaller) {
throw new Error(MANAGED_SERVICE_CALLER_FALLBACK_MESSAGE);
throw new Error(MANAGED_SERVICE_CALLER_FALLBACK_MESSAGE, {
cause: error,
});
}
return restartStackServicesDirect(projectRoot, deps);

View File

@@ -211,6 +211,7 @@ function parseLastAgentSeqState(
`Invalid last_agent_seq JSON for ${serviceId}: ${
err instanceof Error ? err.message : String(err)
}`,
{ cause: err },
);
}

View File

@@ -315,7 +315,9 @@ function restartEjclawStackServices(): string[] {
throw error;
}
if (process.env.SERVICE_ID) {
throw new Error(MANAGED_SERVICE_CALLER_FALLBACK_MESSAGE);
throw new Error(MANAGED_SERVICE_CALLER_FALLBACK_MESSAGE, {
cause: error,
});
}
execFileSync('systemctl', [...systemctlArgs, 'restart', ...services], {

View File

@@ -507,11 +507,13 @@ export function ensureWorkspaceDependenciesInstalled(
const retryDetail = getInstallErrorDetail(retryError);
throw new Error(
`Failed to install workspace dependencies with "${command.commandText}" in ${repoDir} after cleaning node_modules: ${retryDetail}`,
{ cause: retryError },
);
}
} else {
throw new Error(
`Failed to install workspace dependencies with "${command.commandText}" in ${repoDir}: ${detail}`,
{ cause: error },
);
}
}