StackMate now includes a comprehensive plugin system that allows users to access GitHub commits, lint results, and test runner outputs directly within the extension without switching tabs.
- Modular Design: Each plugin is self-contained and follows a consistent interface
- Plugin Manager: Central system for registering, activating, and managing plugins
- Event System: Plugins can communicate with each other and the main application
- Settings Management: Each plugin can maintain its own configuration
- Repository Data: Fetch commits, issues, pull requests, and branches
- Authentication: Support for GitHub personal access tokens
- Caching: Intelligent caching to reduce API calls
- Search: Search repositories and filter results
Available Actions:
- View recent commits with author and date information
- Browse open/closed issues
- Check pull request status
- List repository branches
- Search public repositories
- Real-time Linting: Analyze JavaScript/TypeScript code for issues
- Configurable Rules: Customize linting rules based on your preferences
- Multiple File Support: Lint entire projects or individual files
- Statistics: View error/warning counts and rule breakdown
Supported Rules:
no-unused-vars: Detect unused variablesno-console: Flag console statementsprefer-const: Prefer const over let when possibleno-var: Disallow var declarationseqeqeq: Require === instead of ==curly: Require curly braces for control statements
- Multi-Framework Support: Jest, Mocha, and Vitest compatibility
- Test Discovery: Automatically find test files in your project
- Test Execution: Run tests and view results
- Coverage Reports: Track test coverage statistics
- Result Analysis: Detailed pass/fail statistics
-
Via Command Palette:
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "Open Plugin Manager"
- Press
-
Via Dashboard:
- Open StackMate webview
- Click on "Plugin Manager" card
-
Via Search:
- Type
@pluginsin the search bar
- Type
-
Set Repository:
Owner: microsoft Repo: vscode -
Optional: Add GitHub Token:
- Generate a personal access token at https://github.com/settings/tokens
- Add token in plugin settings for higher rate limits
-
Fetch Data:
- Click "Get Commits" to view recent commits
- Click "Get Issues" to see open issues
-
Lint Current File:
- Use command: "Run ESLint" (
Ctrl+Shift+P) - Or paste code directly in the plugin interface
- Use command: "Run ESLint" (
-
View Results:
- Errors and warnings are displayed with line numbers
- Click on issues to see detailed descriptions
-
Discover Tests:
- Click "Find Tests" to scan for test files
- Supports common test patterns
-
Run Tests:
- Click "Run Tests" to execute all discovered tests
- View pass/fail statistics and execution time
- Extend BasePlugin:
import { BasePlugin } from "./BasePlugin.js";
export class MyPlugin extends BasePlugin {
constructor() {
super({
id: "my-plugin",
name: "My Plugin",
version: "1.0.0",
description: "Description of my plugin",
icon: "IconName",
category: "category",
});
}
async activate() {
await super.activate();
// Plugin initialization logic
}
async executeAction(action, payload) {
switch (action) {
case "myAction":
return await this.handleMyAction(payload);
default:
return await super.executeAction(action, payload);
}
}
}- Register Plugin:
import pluginManager from "../plugins/PluginManager.js";
import { MyPlugin } from "./MyPlugin.js";
const myPlugin = new MyPlugin();
pluginManager.registerPlugin(myPlugin);
await pluginManager.activatePlugin("my-plugin");All plugins must implement:
activate(): Initialize the plugindeactivate(): Clean up resourcesexecuteAction(action, payload): Handle plugin-specific actionsgetInfo(): Return plugin metadata
The plugin system adds several new VS Code commands:
extension.openPluginManager: Open the plugin manager interfaceextension.runESLint: Run ESLint on the current fileextension.runTests: Execute test suite
Use these search triggers to quickly access plugin features:
@plugins: Open plugin manager@github: Access GitHub integration@eslint: Run code linting@test: Execute tests
Plugin settings are stored in the extension's global state and persist between sessions. Each plugin maintains its own configuration namespace.
- Rate Limiting: Add a GitHub personal access token
- Repository Not Found: Check owner/repo spelling
- Network Errors: Verify internet connection
- No Results: Ensure code contains JavaScript/TypeScript
- Rule Errors: Check rule configuration in settings
- No Tests Found: Verify test file patterns
- Execution Errors: Check test framework configuration
- Custom Plugin Support: Allow users to create and install custom plugins
- Plugin Marketplace: Browse and install community plugins
- Advanced GitHub Features: PR reviews, code diff viewing
- Enhanced Testing: Coverage visualization, test debugging
- CI/CD Integration: Connect with build pipelines
To contribute to the plugin system:
- Fork the repository
- Create a feature branch
- Implement your plugin following the established patterns
- Add tests and documentation
- Submit a pull request
The plugin system is part of StackMate and follows the same MIT license.