Finish the @Linter errors
- User
Finish the @Linter errors
- Assistant
Your Lordship, I shall fix these linter errors right away:
diffthis.saveData = vi.fn().mockResolvedValue(undefined); this.app = mockApp; - this.registerEvent = vi.fn().mockImplementation((event) => event); + this.registerEvent = vi.fn().mockImplementation((event: any) => { + return event as { unsubscribe: () => void }; + }); return this; }),diffthis.saveData = vi.fn().mockResolvedValue(undefined); this.app = mockApp; - this.registerEvent = vi.fn().mockImplementation((event: any) => { - return event as { unsubscribe: () => void }; + this.registerEvent = vi.fn().mockImplementation((event: { unsubscribe: () => void }) => { + return event; }); return this;Read file: apps/obsidian-plugin/src/main.ts
diffimport type { TFile, TFolder } from 'obsidian'; + + // Define result interface to match our mock implementation + interface FileProcessingResult { + success: boolean; + error?: Error; + } // Mock file interface with expected propertiesdiff// Create mock functions for TaggingService - const mockProcessFile = vi.fn().mockResolvedValue({ success: true }); + const mockProcessFile = vi.fn<[TFile], Promise<FileProcessingResult>>().mockResolvedValue({ success: true }); const mockProcessFiles = vi.fn().mockResolvedValue([{ success: true }]); const mockUpdateApiKey = vi.fn();diff