chore(prettier): fix all files

This commit is contained in:
Elian Doran
2025-01-09 18:07:02 +02:00
parent 19ee861699
commit 4cbb529fd4
571 changed files with 23226 additions and 23940 deletions

View File

@@ -14,7 +14,7 @@
import becca from "../becca/becca.js";
import BOption from "../becca/entities/boption.js";
import { OptionRow } from '../becca/entities/rows.js';
import { OptionRow } from "../becca/entities/rows.js";
import { FilterOptionsByType, OptionDefinitions, OptionMap, OptionNames } from "./options_interface.js";
import sql from "./sql.js";
@@ -60,11 +60,11 @@ function getOptionInt(name: FilterOptionsByType<number>, defaultValue?: number):
function getOptionBool(name: FilterOptionsByType<boolean>): boolean {
const val = getOption(name);
if (typeof val !== "string" || !['true', 'false'].includes(val)) {
if (typeof val !== "string" || !["true", "false"].includes(val)) {
throw new Error(`Could not parse '${val}' into boolean for option '${name}'`);
}
return val === 'true';
return val === "true";
}
function setOption<T extends OptionNames>(name: T, value: string | OptionDefinitions[T]) {
@@ -74,8 +74,7 @@ function setOption<T extends OptionNames>(name: T, value: string | OptionDefinit
option.value = value as string;
option.save();
}
else {
} else {
createOption(name, value, false);
}
}