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

@@ -38,7 +38,9 @@ function buildLineReply(lineData: LineChannelData): ReplyPayload {
* Data can be a URL (uri action) or plain text (message action) or key=value (postback)
*/
function parseActions(actionsStr: string | undefined): CardAction[] {
if (!actionsStr) return [];
if (!actionsStr) {
return [];
}
const results: CardAction[] = [];
@@ -47,7 +49,9 @@ function parseActions(actionsStr: string | undefined): CardAction[] {
.trim()
.split("|")
.map((s) => s.trim());
if (!label) continue;
if (!label) {
continue;
}
const actionData = data || label;
@@ -158,12 +162,16 @@ export function registerLineCardCommand(api: OpenClawPluginApi): void {
requireAuth: false,
handler: async (ctx) => {
const argsStr = ctx.args?.trim() ?? "";
if (!argsStr) return { text: CARD_USAGE };
if (!argsStr) {
return { text: CARD_USAGE };
}
const parsed = parseCardArgs(argsStr);
const { type, args, flags } = parsed;
if (!type) return { text: CARD_USAGE };
if (!type) {
return { text: CARD_USAGE };
}
// Only LINE supports rich cards; fallback to text elsewhere.
if (ctx.channel !== "line") {