style: fix extension lint violations

This commit is contained in:
Peter Steinberger
2026-04-06 14:45:04 +01:00
parent e8141716b4
commit af62a2c2e4
380 changed files with 2067 additions and 1501 deletions

View File

@@ -8,7 +8,6 @@ import {
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
import {
composeAccountWarningCollectors,
composeWarningCollectors,
createAllowlistProviderOpenWarningCollector,
} from "openclaw/plugin-sdk/channel-policy";
import {
@@ -29,8 +28,8 @@ import {
} from "./accounts.js";
import {
buildBaseChannelStatusSummary,
createAccountStatusSink,
chunkTextForOutbound,
createAccountStatusSink,
DEFAULT_ACCOUNT_ID,
PAIRING_APPROVED_MESSAGE,
type ChannelPlugin,
@@ -38,14 +37,13 @@ import {
import { IrcChannelConfigSchema } from "./config-schema.js";
import { collectIrcMutableAllowlistWarnings } from "./doctor.js";
import {
normalizeIrcMessagingTarget,
looksLikeIrcTargetId,
isChannelTarget,
looksLikeIrcTargetId,
normalizeIrcAllowEntry,
normalizeIrcMessagingTarget,
} from "./normalize.js";
import { resolveIrcGroupMatch, resolveIrcRequireMention } from "./policy.js";
import { probeIrc } from "./probe.js";
import { getIrcRuntime } from "./runtime.js";
import { collectRuntimeConfigAssignments, secretTargetRegistryEntries } from "./secret-contract.js";
import { ircSetupAdapter } from "./setup-core.js";
import { ircSetupWizard } from "./setup-surface.js";

View File

@@ -83,7 +83,7 @@ function withTimeout<T>(promise: Promise<T>, timeoutMs: number, label: string):
function buildFallbackNick(nick: string): string {
const normalized = nick.replace(/\s+/g, "");
const safe = normalized.replace(/[^A-Za-z0-9_\-\[\]\\`^{}|]/g, "");
const safe = normalized.replace(/[^A-Za-z0-9_\-[\]\\`^{}|]/g, "");
const base = safe || "openclaw";
const suffix = "_";
const maxNickLen = 30;

View File

@@ -1,12 +1,10 @@
import {
buildChannelConfigSchema,
BlockStreamingCoalesceSchema,
DmConfigSchema,
DmPolicySchema,
GroupPolicySchema,
MarkdownConfigSchema,
ReplyRuntimeConfigSchemaShape,
ToolPolicySchema,
buildChannelConfigSchema,
requireOpenAllowFrom,
} from "openclaw/plugin-sdk/channel-config-schema";
import { z } from "openclaw/plugin-sdk/zod";

View File

@@ -1,16 +1,17 @@
import type { DmPolicy } from "openclaw/plugin-sdk/config-runtime";
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/routing";
import type {
ChannelSetupDmPolicy,
ChannelSetupWizard,
WizardPrompter,
} from "openclaw/plugin-sdk/setup";
import {
createAllowFromSection,
createPromptParsedAllowFromForAccount,
createStandardChannelSetupStatus,
formatDocsLink,
setSetupChannelEnabled,
} from "openclaw/plugin-sdk/setup";
import type { ChannelSetupDmPolicy } from "openclaw/plugin-sdk/setup";
import type { ChannelSetupWizard } from "openclaw/plugin-sdk/setup";
import { formatDocsLink } from "openclaw/plugin-sdk/setup";
import type { WizardPrompter } from "openclaw/plugin-sdk/setup";
import { listIrcAccountIds, resolveDefaultIrcAccountId, resolveIrcAccount } from "./accounts.js";
import { resolveDefaultIrcAccountId, resolveIrcAccount } from "./accounts.js";
import {
isChannelTarget,
normalizeIrcAllowEntry,
@@ -25,7 +26,7 @@ import {
setIrcNickServ,
updateIrcAccountConfig,
} from "./setup-core.js";
import type { CoreConfig, IrcAccountConfig, IrcNickServConfig } from "./types.js";
import type { CoreConfig } from "./types.js";
const channel = "irc" as const;
const USE_ENV_FLAG = "__ircUseEnv";
@@ -258,7 +259,7 @@ export const ircSetupWizard: ChannelSetupWizard = {
shouldPrompt: ({ credentialValues }) => credentialValues[USE_ENV_FLAG] !== "1",
initialValue: ({ cfg, accountId, credentialValues }) => {
const resolved = resolveIrcAccount({ cfg: cfg as CoreConfig, accountId });
const tls = credentialValues[TLS_FLAG] === "0" ? false : true;
const tls = credentialValues[TLS_FLAG] !== "0";
const defaultPort = resolved.config.port ?? (tls ? 6697 : 6667);
return String(defaultPort);
},

View File

@@ -275,7 +275,7 @@ describe("irc setup", () => {
).toBeNull();
expect(
applyAccountConfig!({
applyAccountConfig({
cfg: { channels: { irc: {} } },
accountId: "default",
input: {