Skip to content

Commit 6fb7d77

Browse files
author
StackMemory Bot (CLI)
committed
fix(lint): fix glob expansion and auto-fix formatting across codebase (STA-444)
- Quote globs in lint/lint:fix scripts so ESLint handles recursive expansion - Previously only 43 files were linted (/bin/sh doesn't expand ** recursively) - Auto-fixed 676 formatting errors, manually fixed 8 real lint errors - 0 errors remaining, 1328 warnings (no-explicit-any, no-unused-vars)
1 parent 3e18796 commit 6fb7d77

40 files changed

Lines changed: 1813 additions & 1056 deletions

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ export default [
5252
'*.js',
5353
'*.min.js',
5454
'*.bundle.js',
55-
'src/integrations/',
5655
'scripts/merge-linear-duplicates.ts',
5756
'**/*.test.ts',
5857
'**/__tests__/**',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787
"postinstall": "node scripts/install-claude-hooks-auto.js || true",
8888
"init": "node dist/scripts/initialize.js",
8989
"build": "rm -rf dist && node esbuild.config.js",
90-
"lint": "eslint src/**/*.ts scripts/**/*.ts",
91-
"lint:fix": "eslint src/**/*.ts scripts/**/*.ts --fix --max-warnings=-1",
90+
"lint": "eslint 'src/**/*.ts' 'scripts/**/*.ts'",
91+
"lint:fix": "eslint 'src/**/*.ts' 'scripts/**/*.ts' --fix --max-warnings=-1",
9292
"lint:fast": "oxlint src scripts",
9393
"format": "prettier --write src/**/*.ts scripts/**/*.ts",
9494
"test": "vitest",

scripts/test-swarm-tui.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@ import { logger } from '../src/core/monitoring/logger.js';
1212
async function testSwarmTUI() {
1313
try {
1414
console.log('🦾 Starting Swarm TUI Test...');
15-
15+
1616
const tui = new SwarmTUI();
17-
17+
1818
// Initialize without swarm coordinator for testing
1919
await tui.initialize();
20-
20+
2121
// Start the TUI
2222
tui.start();
23-
23+
2424
console.log('TUI should now be running. Press q to quit.');
25-
2625
} catch (error: unknown) {
2726
logger.error('TUI test failed', error as Error);
2827
console.error('❌ TUI test failed:', (error as Error).message);
@@ -31,4 +30,4 @@ async function testSwarmTUI() {
3130
}
3231

3332
// Run the test
34-
testSwarmTUI();
33+
testSwarmTUI();

scripts/test-tui-shortcuts.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ console.log(' [ ] Esc - Alternative quit (should exit cleanly)');
2020
console.log(' [ ] Ctrl+C - Force quit (should exit cleanly)');
2121
console.log(' [ ] r - Refresh data (should show "Manual refresh triggered")');
2222
console.log(' [ ] h - Show help (should display full help in logs)');
23-
console.log(' [ ] c - Clear logs (should clear log area and show confirmation)');
24-
console.log(' [ ] d - Detect swarms (should show registry status and process info)');
23+
console.log(
24+
' [ ] c - Clear logs (should clear log area and show confirmation)'
25+
);
26+
console.log(
27+
' [ ] d - Detect swarms (should show registry status and process info)'
28+
);
2529
console.log(' [ ] s - Start swarm help (should show example commands)');
2630
console.log(' [ ] t - Stop swarm (should show appropriate message)');
2731
console.log('');
@@ -35,26 +39,25 @@ console.log('');
3539
console.log('Press Enter to launch TUI...');
3640

3741
// Wait for user input
38-
await new Promise(resolve => {
42+
await new Promise((resolve) => {
3943
process.stdin.once('data', resolve);
4044
});
4145

4246
async function testTUIShortcuts() {
4347
try {
4448
console.log('🚀 Launching TUI for shortcut testing...');
45-
49+
4650
const tui = new SwarmTUI();
47-
51+
4852
// Initialize TUI
4953
await tui.initialize();
50-
54+
5155
// Start the TUI
5256
tui.start();
53-
57+
5458
console.log('✅ TUI launched successfully');
5559
console.log('📝 Test each keyboard shortcut systematically');
5660
console.log('🏁 Use "q" to quit when testing is complete');
57-
5861
} catch (error: unknown) {
5962
logger.error('TUI shortcuts test failed', error as Error);
6063
console.error('❌ TUI shortcuts test failed:', (error as Error).message);
@@ -63,4 +66,4 @@ async function testTUIShortcuts() {
6366
}
6467

6568
// Run the test
66-
testTUIShortcuts();
69+
testTUIShortcuts();

scripts/validate-tui-shortcuts.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,26 @@ import { logger } from '../src/core/monitoring/logger.js';
1212
async function validateTUIShortcuts() {
1313
try {
1414
console.log('🧪 Validating TUI Keyboard Shortcuts...');
15-
15+
1616
const tui = new SwarmTUI();
1717
await tui.initialize();
18-
18+
1919
// Access the screen object to check key handlers
2020
const screen = (tui as any).screen;
21-
21+
2222
if (!screen) {
2323
throw new Error('Screen not initialized');
2424
}
25-
25+
2626
// Check if key handlers exist
2727
const keyHandlers = screen._events.key || [];
28-
28+
2929
console.log('📋 Validation Results:');
3030
console.log(`✅ Screen initialized: ${screen ? 'Yes' : 'No'}`);
31-
console.log(`✅ Key handlers registered: ${keyHandlers.length > 0 ? 'Yes' : 'No'}`);
32-
31+
console.log(
32+
`✅ Key handlers registered: ${keyHandlers.length > 0 ? 'Yes' : 'No'}`
33+
);
34+
3335
// Test the help functionality directly
3436
console.log('\n🔍 Testing Help Function:');
3537
try {
@@ -38,7 +40,7 @@ async function validateTUIShortcuts() {
3840
} catch (error: unknown) {
3941
console.log('❌ Help function failed:', (error as Error).message);
4042
}
41-
43+
4244
// Test the detect function
4345
console.log('\n🔍 Testing Detect Function:');
4446
try {
@@ -47,7 +49,7 @@ async function validateTUIShortcuts() {
4749
} catch (error: unknown) {
4850
console.log('❌ Detect function failed:', (error as Error).message);
4951
}
50-
52+
5153
// Test refresh function
5254
console.log('\n🔍 Testing Refresh Function:');
5355
try {
@@ -56,7 +58,7 @@ async function validateTUIShortcuts() {
5658
} catch (error: unknown) {
5759
console.log('❌ Refresh function failed:', (error as Error).message);
5860
}
59-
61+
6062
// Test clear logs function
6163
console.log('\n🔍 Testing Clear Logs Function:');
6264
try {
@@ -65,13 +67,12 @@ async function validateTUIShortcuts() {
6567
} catch (error: unknown) {
6668
console.log('❌ Clear logs function failed:', (error as Error).message);
6769
}
68-
70+
6971
// Cleanup
7072
(tui as any).cleanup();
71-
73+
7274
console.log('\n✅ All TUI shortcut validations passed!');
7375
console.log('💡 Run scripts/test-tui-shortcuts.ts for interactive testing');
74-
7576
} catch (error: unknown) {
7677
logger.error('TUI shortcuts validation failed', error as Error);
7778
console.error('❌ Validation failed:', (error as Error).message);
@@ -80,4 +81,4 @@ async function validateTUIShortcuts() {
8081
}
8182

8283
// Run validation
83-
validateTUIShortcuts();
84+
validateTUIShortcuts();

src/agents/core/agent-task-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export enum AgentType {
7373
TESTING = 'testing',
7474
PERFORMANCE = 'performance',
7575
DOCUMENTATION = 'documentation',
76-
REFACTORING = 'refactoring'
76+
REFACTORING = 'refactoring',
7777
}
7878

7979
/**

0 commit comments

Comments
 (0)