chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.

This commit is contained in:
cpojer
2026-01-31 16:03:28 +09:00
parent 481f696a87
commit 15792b153f
292 changed files with 643 additions and 699 deletions

View File

@@ -108,7 +108,7 @@ export async function channelsAddCommand(
if (wantsNames) {
for (const channel of selection) {
const accountId = accountIds[channel] ?? DEFAULT_ACCOUNT_ID;
const plugin = getChannelPlugin(channel as ChannelId);
const plugin = getChannelPlugin(channel);
const account = plugin?.config.resolveAccount(nextConfig, accountId) as
| { name?: string }
| undefined;

View File

@@ -38,25 +38,25 @@ export async function channelsRemoveCommand(
if (useWizard && prompter) {
await prompter.intro("Remove channel account");
const selectedChannel = (await prompter.select({
const selectedChannel = await prompter.select({
message: "Channel",
options: listChannelPlugins().map((plugin) => ({
value: plugin.id,
label: plugin.meta.label,
})),
})) as ChatChannel;
});
channel = selectedChannel;
accountId = await (async () => {
const ids = listAccountIds(cfg, selectedChannel);
const choice = (await prompter.select({
const choice = await prompter.select({
message: "Account",
options: ids.map((id) => ({
value: id,
label: id === DEFAULT_ACCOUNT_ID ? "default (primary)" : id,
})),
initialValue: ids[0] ?? DEFAULT_ACCOUNT_ID,
})) as string;
});
return normalizeAccountId(choice);
})();

View File

@@ -130,7 +130,7 @@ export function formatGatewayChannelsStatusLines(payload: Record<string, unknown
for (const plugin of plugins) {
const accounts = accountPayloads[plugin.id];
if (accounts && accounts.length > 0) {
lines.push(...accountLines(plugin.id as ChatChannel, accounts));
lines.push(...accountLines(plugin.id, accounts));
}
}
@@ -217,7 +217,7 @@ async function formatConfigChannelsStatusLines(
snapshots.push(snapshot);
}
if (snapshots.length > 0) {
lines.push(...accountLines(plugin.id as ChatChannel, snapshots));
lines.push(...accountLines(plugin.id, snapshots));
}
}