chore: enable no-unnecessary-template-expression

This commit is contained in:
Peter Steinberger
2026-04-10 20:00:58 +01:00
parent 01113566fd
commit 2940379361
5 changed files with 4 additions and 5 deletions

View File

@@ -63,7 +63,6 @@
"typescript/no-explicit-any": "off",
"typescript/no-floating-promises": "off",
"typescript/no-redundant-type-constituents": "off",
"typescript/no-unnecessary-template-expression": "off",
"typescript/unbound-method": "off",
"eslint/no-unsafe-optional-chaining": "off"
}

View File

@@ -607,7 +607,7 @@ describe("loginGeminiCliOAuth", () => {
note: async () => {},
prompt: async () => {
const state = new URL(authUrl).searchParams.get("state");
return `${"http://localhost:8085/oauth2callback"}?code=oauth-code&state=${state}`;
return `http://localhost:8085/oauth2callback?code=oauth-code&state=${state}`;
},
progress: { update: () => {}, stop: () => {} },
});

View File

@@ -17,7 +17,7 @@ vi.mock("./channel-react-action.runtime.js", async () => {
toolContext?: { currentMessageId?: string | number | null };
}) => args.messageId ?? toolContext?.currentMessageId ?? null,
normalizeWhatsAppTarget: (value?: string | null) => {
const raw = `${value ?? ""}`.trim();
const raw = (value ?? "").trim();
if (!raw) {
return null;
}

View File

@@ -39,7 +39,7 @@ vi.mock("openclaw/plugin-sdk/setup", async () => {
"openclaw/plugin-sdk/setup",
);
const normalizeE164 = (value?: string | null) => {
const raw = `${value ?? ""}`.trim();
const raw = (value ?? "").trim();
if (!raw) {
return "";
}

View File

@@ -15,7 +15,7 @@ vi.mock("./heartbeat-recipients.runtime.js", () => ({
return trimmed ? (trimmed as "whatsapp") : null;
},
normalizeE164: (value?: string | null) => {
const digits = `${value ?? ""}`.replace(/[^\d+]/g, "");
const digits = (value ?? "").replace(/[^\d+]/g, "");
if (!digits) {
return "";
}