chore: Lint extensions folder.

This commit is contained in:
cpojer
2026-01-31 22:13:48 +09:00
parent 4f2166c503
commit 230ca789e2
221 changed files with 4006 additions and 1583 deletions

View File

@@ -18,7 +18,7 @@ import {
resolveDefaultBlueBubblesAccountId,
} from "./accounts.js";
import { normalizeBlueBubblesServerUrl } from "./types.js";
import { parseBlueBubblesAllowTarget, normalizeBlueBubblesHandle } from "./targets.js";
import { parseBlueBubblesAllowTarget } from "./targets.js";
const channel = "bluebubbles" as const;
@@ -110,10 +110,14 @@ async function promptBlueBubblesAllowFrom(params: {
initialValue: existing[0] ? String(existing[0]) : undefined,
validate: (value) => {
const raw = String(value ?? "").trim();
if (!raw) return "Required";
if (!raw) {
return "Required";
}
const parts = parseBlueBubblesAllowFromInput(raw);
for (const part of parts) {
if (part === "*") continue;
if (part === "*") {
continue;
}
const parsed = parseBlueBubblesAllowTarget(part);
if (parsed.kind === "handle" && !parsed.handle) {
return `Invalid entry: ${part}`;
@@ -188,7 +192,9 @@ export const blueBubblesOnboardingAdapter: ChannelOnboardingAdapter = {
placeholder: "http://192.168.1.100:1234",
validate: (value) => {
const trimmed = String(value ?? "").trim();
if (!trimmed) return "Required";
if (!trimmed) {
return "Required";
}
try {
const normalized = normalizeBlueBubblesServerUrl(trimmed);
new URL(normalized);
@@ -211,7 +217,9 @@ export const blueBubblesOnboardingAdapter: ChannelOnboardingAdapter = {
initialValue: serverUrl,
validate: (value) => {
const trimmed = String(value ?? "").trim();
if (!trimmed) return "Required";
if (!trimmed) {
return "Required";
}
try {
const normalized = normalizeBlueBubblesServerUrl(trimmed);
new URL(normalized);
@@ -268,8 +276,12 @@ export const blueBubblesOnboardingAdapter: ChannelOnboardingAdapter = {
initialValue: existingWebhookPath || "/bluebubbles-webhook",
validate: (value) => {
const trimmed = String(value ?? "").trim();
if (!trimmed) return "Required";
if (!trimmed.startsWith("/")) return "Path must start with /";
if (!trimmed) {
return "Required";
}
if (!trimmed.startsWith("/")) {
return "Path must start with /";
}
return undefined;
},
});