mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 13:01:25 +00:00
chore: Enable no-useless-concat (removing the lint rule from the disabled list automatically enables it because it is in the "suspicious" group).
This commit is contained in:
@@ -21,8 +21,6 @@
|
|||||||
"unicorn/require-post-message-target-origin": "off",
|
"unicorn/require-post-message-target-origin": "off",
|
||||||
"typescript/no-extraneous-class": "off",
|
"typescript/no-extraneous-class": "off",
|
||||||
"oxc/no-async-endpoint-handlers": "off",
|
"oxc/no-async-endpoint-handlers": "off",
|
||||||
"eslint/no-useless-concat": "off",
|
|
||||||
"eslint/no-unused-vars": "error",
|
|
||||||
"eslint/no-new": "off",
|
"eslint/no-new": "off",
|
||||||
"eslint/preserve-caught-error": "off",
|
"eslint/preserve-caught-error": "off",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ describe("hooks mapping", () => {
|
|||||||
it("runs transform module", async () => {
|
it("runs transform module", async () => {
|
||||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-hooks-"));
|
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-hooks-"));
|
||||||
const modPath = path.join(dir, "transform.mjs");
|
const modPath = path.join(dir, "transform.mjs");
|
||||||
const placeholder = "${" + "payload.name}";
|
const placeholder = "${payload.name}";
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
modPath,
|
modPath,
|
||||||
`export default ({ payload }) => ({ kind: "wake", text: \`Ping ${placeholder}\` });`,
|
`export default ({ payload }) => ({ kind: "wake", text: \`Ping ${placeholder}\` });`,
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ describe("media understanding auto-detect (e2e)", () => {
|
|||||||
await writeExecutable(
|
await writeExecutable(
|
||||||
binDir,
|
binDir,
|
||||||
"sherpa-onnx-offline",
|
"sherpa-onnx-offline",
|
||||||
"#!/usr/bin/env bash\n" + 'echo "{\\"text\\":\\"sherpa ok\\"}"\n',
|
`#!/usr/bin/env bash\necho "{\\"text\\":\\"sherpa ok\\"}"\n`,
|
||||||
);
|
);
|
||||||
|
|
||||||
process.env.PATH = `${binDir}:/usr/bin:/bin`;
|
process.env.PATH = `${binDir}:/usr/bin:/bin`;
|
||||||
@@ -143,7 +143,7 @@ describe("media understanding auto-detect (e2e)", () => {
|
|||||||
await writeExecutable(
|
await writeExecutable(
|
||||||
binDir,
|
binDir,
|
||||||
"gemini",
|
"gemini",
|
||||||
"#!/usr/bin/env bash\necho '{" + '\\"response\\":\\"gemini ok\\"' + "}'\n",
|
`#!/usr/bin/env bash\necho '{\\"response\\":\\"gemini ok\\"' + "}'\n`,
|
||||||
);
|
);
|
||||||
|
|
||||||
process.env.PATH = `${binDir}:/usr/bin:/bin`;
|
process.env.PATH = `${binDir}:/usr/bin:/bin`;
|
||||||
|
|||||||
Reference in New Issue
Block a user