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

@@ -23,9 +23,13 @@ import { parseConfigCommand } from "./config-commands.js";
import { parseDebugCommand } from "./debug-commands.js";
export const handleConfigCommand: CommandHandler = async (params, allowTextCommands) => {
if (!allowTextCommands) return null;
if (!allowTextCommands) {
return null;
}
const configCommand = parseConfigCommand(params.command.commandBodyNormalized);
if (!configCommand) return null;
if (!configCommand) {
return null;
}
if (!params.command.isAuthorizedSender) {
logVerbose(
`Ignoring /config from unauthorized sender: ${params.command.senderId || "<unknown>"}`,
@@ -173,9 +177,13 @@ export const handleConfigCommand: CommandHandler = async (params, allowTextComma
};
export const handleDebugCommand: CommandHandler = async (params, allowTextCommands) => {
if (!allowTextCommands) return null;
if (!allowTextCommands) {
return null;
}
const debugCommand = parseDebugCommand(params.command.commandBodyNormalized);
if (!debugCommand) return null;
if (!debugCommand) {
return null;
}
if (!params.command.isAuthorizedSender) {
logVerbose(
`Ignoring /debug from unauthorized sender: ${params.command.senderId || "<unknown>"}`,