From 7c5d946175f12c15900234ba3bb06b7a0c7c7ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Angner?= Date: Sun, 1 Mar 2026 15:21:21 +0100 Subject: [PATCH] Fix ESLint errors blocking npm publish - Remove unused catch binding in _base-ide.js - Use replaceAll() instead of replace() with regex - Use String.raw for escape sequences in gemini.js and qwen.js - Use node: protocol for child_process import Co-Authored-By: Claude Opus 4.6 --- tools/cli/installers/lib/ide/_base-ide.js | 4 ++-- tools/cli/installers/lib/ide/gemini.js | 2 +- tools/cli/installers/lib/ide/qwen.js | 2 +- tools/cli/lib/installer.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/cli/installers/lib/ide/_base-ide.js b/tools/cli/installers/lib/ide/_base-ide.js index fb392bd82..1950f32d7 100644 --- a/tools/cli/installers/lib/ide/_base-ide.js +++ b/tools/cli/installers/lib/ide/_base-ide.js @@ -157,7 +157,7 @@ class BaseIdeSetup { icon: '📋', slug: agentName.split('-')[0], }; - } catch (error) { + } catch { // Fallback metadata on error const agentName = path.basename(filePath, '.md'); return { @@ -177,7 +177,7 @@ class BaseIdeSetup { */ formatAgentLauncher(agentName, agentPath) { const relativePath = path.relative(process.cwd(), agentPath) - .replace(/\\/g, '/'); // Convert Windows paths to forward slashes + .replaceAll('\\', '/'); // Convert Windows paths to forward slashes return ` diff --git a/tools/cli/installers/lib/ide/gemini.js b/tools/cli/installers/lib/ide/gemini.js index fc94ade98..cf9c978b8 100644 --- a/tools/cli/installers/lib/ide/gemini.js +++ b/tools/cli/installers/lib/ide/gemini.js @@ -33,7 +33,7 @@ class GeminiSetup extends BaseIdeSetup { metadata.description || 'WDS Agent'; // Escape content for TOML multi-line string - const escapedContent = content.replace(/"""/g, '\\"\\"\\"'); + const escapedContent = content.replaceAll('"""', String.raw`\"\"\"`); return `description = "${description}" diff --git a/tools/cli/installers/lib/ide/qwen.js b/tools/cli/installers/lib/ide/qwen.js index b21103e20..6ef487c50 100644 --- a/tools/cli/installers/lib/ide/qwen.js +++ b/tools/cli/installers/lib/ide/qwen.js @@ -33,7 +33,7 @@ class QwenSetup extends BaseIdeSetup { metadata.description || 'WDS Agent'; // Escape content for TOML multi-line string - const escapedContent = content.replace(/"""/g, '\\"\\"\\"'); + const escapedContent = content.replaceAll('"""', String.raw`\"\"\"`); return `description = "${description}" diff --git a/tools/cli/lib/installer.js b/tools/cli/lib/installer.js index 99e7606da..b7d20c898 100644 --- a/tools/cli/lib/installer.js +++ b/tools/cli/lib/installer.js @@ -210,7 +210,7 @@ class Installer { // Get user name from git or system const getUserName = () => { try { - const { execSync } = require('child_process'); + const { execSync } = require('node:child_process'); const gitName = execSync('git config user.name', { encoding: 'utf8' }).trim(); return gitName || 'Designer'; } catch {