Refines inline comments in plugin code
Consolidates existing comments by removing redundancy and improves clarity for ESLint directives, enhancing code readability and maintenance.
This commit is contained in:
1 file changed
+1
-4
@@ -79,7 +79,6 @@ export class obsidianTypstPDFExport extends Plugin {
|
|||||||
`);
|
`);
|
||||||
|
|
||||||
// Add ribbon icon using custom icon
|
// Add ribbon icon using custom icon
|
||||||
// eslint-disable-next-line obsidianmd/ui/sentence-case -- "PDF" is an acronym and "Typst" is a proper noun
|
|
||||||
this.addRibbonIcon('typst-pdf-export', 'Export to PDF with Typst', (event: MouseEvent) => {
|
this.addRibbonIcon('typst-pdf-export', 'Export to PDF with Typst', (event: MouseEvent) => {
|
||||||
this.eventHandlers.handleRibbonClick(event);
|
this.eventHandlers.handleRibbonClick(event);
|
||||||
});
|
});
|
||||||
@@ -239,9 +238,7 @@ export class obsidianTypstPDFExport extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Obsidian supports async onunload and will await it properly, even though
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises -- Obsidian supports async onunload and will await it properly, even though the Plugin type definition shows void return. This ensures cleanup completes.
|
||||||
// the Plugin type definition shows void return. This ensures cleanup completes.
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
||||||
async onunload(): Promise<void> {
|
async onunload(): Promise<void> {
|
||||||
// Use lifecycle manager for cleanup
|
// Use lifecycle manager for cleanup
|
||||||
await this.lifecycle.cleanup();
|
await this.lifecycle.cleanup();
|
||||||
|
|||||||
Reference in new issue
Block a user