chore: Enable "curly" rule to avoid single-statement if confusion/errors.

This commit is contained in:
cpojer
2026-01-31 16:19:20 +09:00
parent 009b16fab8
commit 5ceff756e1
1266 changed files with 27871 additions and 9393 deletions

View File

@@ -15,7 +15,9 @@ function setProcessTitleForCommand(actionCommand: Command) {
}
const name = current.name();
const cliName = resolveCliName();
if (!name || name === cliName) return;
if (!name || name === cliName) {
return;
}
process.title = `${cliName}-${name}`;
}
@@ -26,7 +28,9 @@ export function registerPreActionHooks(program: Command, programVersion: string)
program.hook("preAction", async (_thisCommand, actionCommand) => {
setProcessTitleForCommand(actionCommand);
const argv = process.argv;
if (hasHelpOrVersion(argv)) return;
if (hasHelpOrVersion(argv)) {
return;
}
const commandPath = getCommandPath(argv, 2);
const hideBanner =
isTruthyEnvValue(process.env.OPENCLAW_HIDE_BANNER) ||
@@ -41,7 +45,9 @@ export function registerPreActionHooks(program: Command, programVersion: string)
if (!verbose) {
process.env.NODE_NO_WARNINGS ??= "1";
}
if (commandPath[0] === "doctor" || commandPath[0] === "completion") return;
if (commandPath[0] === "doctor" || commandPath[0] === "completion") {
return;
}
await ensureConfigReady({ runtime: defaultRuntime, commandPath });
// Load plugins for commands that need channel access
if (PLUGIN_REQUIRED_COMMANDS.has(commandPath[0])) {