Fix lint and formatting issues for v0.2.0 release

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Mårten Angner 2026-02-22 14:18:53 +01:00
parent de72bb42d7
commit 629de0849e
9 changed files with 26 additions and 31 deletions

View File

@ -9,6 +9,9 @@ ignores:
- _bmad*/**
- .*/**
- z*/**
- docs/examples/**
- "**/templates/**"
- "**/steps-c/**"
# Rule configuration
config:

View File

@ -318,7 +318,7 @@ Complete list for test automation:
---
## How It Works
## How the Handoff Works
### Review Completeness
@ -398,7 +398,7 @@ Organize everything into the UI Roadmap folder:
---
## When to Use This Phase
## When to Use This Phase (Summary)
**First handoff when:**

View File

@ -19,8 +19,8 @@
"author": "Whiteport Collective",
"main": "tools/cli/wds-cli.js",
"bin": {
"whiteport-design-studio": "tools/wds-npx-wrapper.js",
"wds-studio": "tools/wds-npx-wrapper.js"
"wds-studio": "tools/wds-npx-wrapper.js",
"whiteport-design-studio": "tools/wds-npx-wrapper.js"
},
"files": [
"tools/",

View File

@ -146,4 +146,3 @@ post-install-notes: |
Github Issues, PRs: https://github.com/bmad-code-org/bmad-method-wds-expansion/issues
License: MIT

View File

@ -171,7 +171,7 @@ function buildMenuXml(menuItems, wdsFolder) {
// Rebuild multi description without party-mode reference
let multiDesc = item.multi;
multiDesc = multiDesc.replace(/\[SPM\] Start Party Mode \(optionally suggest attendees and topic\),?\s*/g, '').trim();
multiDesc = multiDesc.replaceAll(/\[SPM\] Start Party Mode \(optionally suggest attendees and topic\),?\s*/g, '').trim();
if (!multiDesc) multiDesc = '[CH] Chat';
xml += ` <item type="multi">${escapeXml(multiDesc)}\n`;
@ -360,12 +360,7 @@ function compileAgentFile(yamlPath, options = {}) {
// Agent opening tag
const agentId = `${wdsFolder}/agents/${basename}.md`;
const agentAttrs = [
`id="${agentId}"`,
`name="${meta.name || ''}"`,
`title="${meta.title || ''}"`,
`icon="${meta.icon || ''}"`,
];
const agentAttrs = [`id="${agentId}"`, `name="${meta.name || ''}"`, `title="${meta.title || ''}"`, `icon="${meta.icon || ''}"`];
output += `<agent ${agentAttrs.join(' ')}>\n`;
// Activation block (inlined)

View File

@ -84,7 +84,7 @@ async function writeIdeConfig(projectDir, ide, wdsFolder) {
await fs.ensureDir(path.dirname(filePath));
// If append mode and file exists, append with separator
if (config.append && await fs.pathExists(filePath)) {
if (config.append && (await fs.pathExists(filePath))) {
const existing = await fs.readFile(filePath, 'utf8');
if (!existing.includes('Whiteport Design Studio')) {
await fs.writeFile(filePath, existing + '\n\n' + content + '\n', 'utf8');

View File

@ -76,9 +76,9 @@ class Installer {
try {
await this.copySrcFiles(wdsDir);
spinner.succeed('WDS files copied');
} catch (err) {
} catch (error) {
spinner.fail('Failed to copy WDS files');
throw err;
throw error;
}
// Step 2: Write config.yaml
@ -86,9 +86,9 @@ class Installer {
try {
await this.writeConfig(wdsDir, config);
configSpinner.succeed('Configuration saved');
} catch (err) {
} catch (error) {
configSpinner.fail('Failed to write configuration');
throw err;
throw error;
}
// Step 3: Compile agents
@ -96,9 +96,9 @@ class Installer {
try {
const agents = await this.compileAgents(wdsDir, wdsFolder);
agentSpinner.succeed(`Compiled ${agents.length} agents`);
} catch (err) {
} catch (error) {
agentSpinner.fail('Failed to compile agents');
throw err;
throw error;
}
// Step 4: Create docs folder structure
@ -106,9 +106,9 @@ class Installer {
try {
await this.createDocsFolders(projectDir);
docsSpinner.succeed('Project folders created');
} catch (err) {
} catch (error) {
docsSpinner.fail('Failed to create project folders');
throw err;
throw error;
}
// Step 5: Set up IDEs
@ -121,9 +121,9 @@ class Installer {
labels.push(result.label);
}
ideSpinner.succeed(`Configured: ${labels.join(', ')}`);
} catch (err) {
} catch (error) {
ideSpinner.fail('Failed to set up IDEs');
throw err;
throw error;
}
// Step 6: Copy learning & reference material (optional)
@ -132,9 +132,9 @@ class Installer {
try {
await this.copyLearningMaterial(projectDir);
learnSpinner.succeed('Learning material added to _wds-learn/ (safe to remove when no longer needed)');
} catch (err) {
} catch (error) {
learnSpinner.fail('Failed to copy learning material');
throw err;
throw error;
}
}
@ -215,7 +215,7 @@ class Installer {
async copyLearningMaterial(projectDir) {
const learnDir = path.join(projectDir, '_wds-learn');
const learningDirs = ['getting-started', 'learn-wds', 'method', 'models', 'tools'];
const excludeDirs = ['course-explainers', 'Webinars'];
const excludeDirs = new Set(['course-explainers', 'Webinars']);
for (const dir of learningDirs) {
const src = path.join(this.docsDir, dir);
@ -225,7 +225,7 @@ class Installer {
filter: (srcPath) => {
const relative = path.relative(src, srcPath);
const topDir = relative.split(path.sep)[0];
return !excludeDirs.includes(topDir);
return !excludeDirs.has(topDir);
},
});
}

View File

@ -89,7 +89,7 @@ class UI {
name: 'ides',
message: 'Which AI IDE/tools are you using? (Space to select, Enter to confirm)',
choices: getIdeChoices(),
validate: (answer) => answer.length > 0 ? true : 'Select at least one IDE.',
validate: (answer) => (answer.length > 0 ? true : 'Select at least one IDE.'),
},
]);

View File

@ -23,9 +23,7 @@ const packageJson = require('../../package.json');
const installCommand = require('./commands/install');
// Set up program
program
.version(packageJson.version)
.description('Whiteport Design Studio - Strategic design methodology for AI-powered workflows');
program.version(packageJson.version).description('Whiteport Design Studio - Strategic design methodology for AI-powered workflows');
// Register install command
const cmd = program.command(installCommand.command).description(installCommand.description);