Applies linting rules to the codebase and resolves identified issues.
Addresses:
- Renamed headings in settings tabs to improve UI consistency and style.
- Resolved require() style imports
- Added void operator to ensure correct promise handling.
- Replaced deprecated Obsidian API calls.
- Enforces sentence case to enhance UI text consistency.
- Add missing ExportErrorHandler import in SettingsTab.ts
- Add customEnvironmentVariables property to settings interface
- Fix undefined metadata access with optional chaining in EmbedProcessor.ts
- Update ModalState.ts to use new nested settings structure
- Simplify ExportConfigModal.ts to use full settings object
- Add null safety checks for templateDropdown in GeneralSection.ts
- Replace all 'any' types with proper TypeScript types throughout codebase
- Fix processedResult parameters to use PreprocessingResult interface
- Update UI modal types: app parameter (App), pluginDefaults (obsidianTypstPDFExportSettings)
- Fix dropdown components to use DropdownComponent from Obsidian API
- Replace plugin 'any' types with obsidianTypstPDFExport throughout converters
- Fix margins parameter to use proper interface structure
- Update fs parameter to use proper Node.js fs module type
- Improve error handling with proper unknown type and type guards
- Remove unused PdfEmbedProcessor and clean up imports
Achieves complete type safety with zero remaining 'any' types across src/ directory.
Provides better IDE support, compile-time error detection, and maintainability.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unused getOutputFilename() method
- Remove unnecessary delegation methods showValidationErrors() and showValidationWarnings()
- Update handleSubmit() to call renderer methods directly
- Clean up excessive blank lines for better readability
- Reduce file size from 237 to 219 lines while maintaining functionality
This completes Phase 4.3 of the large file refactoring plan, achieving
the target of ~200 lines while preserving all modal lifecycle methods,
event handlers, and state management functionality.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Extract validation orchestration logic into dedicated ModalValidator class
as part of Phase 4 modal refactoring to improve maintainability.
Changes:
- Create src/ui/modal/ModalValidator.ts with validateAllSections() method
- Remove validateAllSections() method from ExportConfigModal.ts
- Update ExportConfigModal to delegate validation to ModalValidator
- Fix TypeScript handling of optional warnings property
- Maintain exact same validation behavior and error handling
Build: ✅ npm run build passes
Size: ExportConfigModal.ts reduced by ~20 lines
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Create dedicated ModalRenderer class to handle all DOM rendering logic previously embedded in ExportConfigModal. This comprehensive extraction moves substantive implementation rather than just skeletal structures.
Key changes:
• New ModalRenderer.ts - Complete rendering logic (480+ lines)
• Extracted methods with full implementations:
- createHeader() - Header creation with note info display
- renderSections() - Section rendering and clearing logic
- createProgressContainer() - Progress UI with bar and text
- createActionButtons() - Button creation with event handlers
- showProgress()/updateProgress() - Progress update logic
- addModalStyles() - Complete CSS styling (122 lines)
- showValidationErrors/Warnings() - Error/warning display
• ExportConfigModal updated to use ModalRenderer via dependency injection
• Proper separation: renderer owns DOM, modal handles business logic
• All TypeScript compilation passes
Follows Step 4.1 of refactoring plan. Ready for modal display testing.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace hardcoded '.obsidian' paths with Vault#configDir for proper config directory support
- Move inline styles to CSS classes for better theme compatibility
- Remove unnecessary type casting by using proper type predicates
- Add proper TypeScript type narrowing for filtered arrays
This addresses all required issues identified by the Obsidian Review Bot:
* TempDirectoryManager now accepts configDir parameter from app.vault.configDir
* PdfToImageConverter uses configDir instead of hardcoded '.obsidian'
* ExportConfigModal uses CSS classes (.export-progress-visible, .export-form-hidden) instead of inline styles
* Progress bar width controlled via CSS custom property --progress-width
* Removed 'as TFile[]' casting by implementing isMarkdownFile type predicate
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Updates the export config modal to hide the form and show the progress container by modifying the display properties.
It ensures that only one section is visible at any given time for a cleaner user experience.
Moves components and modules to more appropriate directories.
This change improves project organization and maintainability by grouping related files into logical directories, enhancing code discoverability and reducing potential naming conflicts.