fix: address all Obsidian plugin submission code review issues

This commit resolves all required and optional issues from the plugin
submission review to comply with Obsidian plugin guidelines.

Required Changes:
- Type Safety: Added eslint-disable comments with justifications for
  necessary any types in JSON-RPC tool argument handling
- Command IDs: Removed redundant "mcp-server" prefix from command
  identifiers (BREAKING CHANGE):
  - start-mcp-server → start-server
  - stop-mcp-server → stop-server
  - restart-mcp-server → restart-server
- Promise Handling: Added void operator for intentional fire-and-forget
  promise in notification queue processing
- ESLint Directives: Added descriptive explanations to all
  eslint-disable comments
- Switch Statement Scope: Wrapped case blocks in braces to fix lexical
  declaration warnings in glob pattern matcher
- Regular Expression: Added eslint-disable comment for control character
  validation in Windows path checking
- Type Definitions: Changed empty object type {} to object in MCP
  capabilities interface
- Import Statements: Added comprehensive justifications for require()
  usage in Electron/Node.js modules (synchronous access required)

Optional Improvements:
- Code Cleanup: Removed unused imports (MCPPluginSettings, TFile,
  VaultInfo)

Documentation:
- Enhanced inline code documentation for ESLint suppressions and
  require() statements
- Added detailed rationale for synchronous module loading requirements
  in Obsidian plugin context
- Updated CHANGELOG.md for version 1.1.2

All changes verified:
- Build: Successful with no TypeScript errors
- Tests: All 760 tests passing
- ESLint: All review-required issues resolved

Version bumped to 1.1.2 in package.json and manifest.json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-15 19:30:49 -05:00
parent 8bf8a956f4
commit c62e256331
15 changed files with 62 additions and 29 deletions

View File

@@ -52,7 +52,7 @@ export default class MCPServerPlugin extends Plugin {
// Register commands
this.addCommand({
id: 'start-mcp-server',
id: 'start-server',
name: 'Start server',
callback: async () => {
await this.startServer();
@@ -60,7 +60,7 @@ export default class MCPServerPlugin extends Plugin {
});
this.addCommand({
id: 'stop-mcp-server',
id: 'stop-server',
name: 'Stop server',
callback: async () => {
await this.stopServer();
@@ -68,7 +68,7 @@ export default class MCPServerPlugin extends Plugin {
});
this.addCommand({
id: 'restart-mcp-server',
id: 'restart-server',
name: 'Restart server',
callback: async () => {
await this.stopServer();