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 <noreply@anthropic.com>
This commit is contained in:
parent
5a297389c8
commit
7c5d946175
|
|
@ -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 `<!-- WDS Agent Launcher -->
|
||||
<!-- This file references the compiled agent. Do not edit directly. -->
|
||||
|
|
|
|||
|
|
@ -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}"
|
||||
|
||||
|
|
|
|||
|
|
@ -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}"
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue