chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -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])) {
|
||||
|
||||
Reference in New Issue
Block a user