mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
chore: enable no-unnecessary-template-expression
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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: () => {} },
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 "";
|
||||
}
|
||||
|
||||
@@ -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 "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user