chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -1,10 +1,6 @@
import type { SlackReactionNotificationMode } from "../../config/config.js";
import type { SlackMessageEvent } from "../types.js";
import {
allowListMatches,
normalizeAllowListLower,
normalizeSlackSlug,
} from "./allow-list.js";
import { allowListMatches, normalizeAllowListLower, normalizeSlackSlug } from "./allow-list.js";
export type SlackChannelConfigResolved = {
allowed: boolean;
@@ -49,10 +45,7 @@ export function shouldEmitSlackReactionNotification(params: {
return true;
}
export function resolveSlackChannelLabel(params: {
channelId?: string;
channelName?: string;
}) {
export function resolveSlackChannelLabel(params: { channelId?: string; channelName?: string }) {
const channelName = params.channelName?.trim();
if (channelName) {
const slug = normalizeSlackSlug(channelName);
@@ -118,23 +111,14 @@ export function resolveSlackChannelConfig(params: {
const resolved = matched ?? fallback ?? {};
const allowed =
firstDefined(
resolved.enabled,
resolved.allow,
fallback?.enabled,
fallback?.allow,
true,
) ?? true;
const requireMention =
firstDefined(resolved.requireMention, fallback?.requireMention, true) ??
firstDefined(resolved.enabled, resolved.allow, fallback?.enabled, fallback?.allow, true) ??
true;
const requireMention =
firstDefined(resolved.requireMention, fallback?.requireMention, true) ?? true;
const allowBots = firstDefined(resolved.allowBots, fallback?.allowBots);
const users = firstDefined(resolved.users, fallback?.users);
const skills = firstDefined(resolved.skills, fallback?.skills);
const systemPrompt = firstDefined(
resolved.systemPrompt,
fallback?.systemPrompt,
);
const systemPrompt = firstDefined(resolved.systemPrompt, fallback?.systemPrompt);
return { allowed, requireMention, allowBots, users, skills, systemPrompt };
}