Enable and fix no-empty linting rule

This commit is contained in:
James Brunton 2025-09-02 16:57:03 +01:00
parent 0de0bb2d41
commit ef7c25482e
3 changed files with 9 additions and 8 deletions

View File

@ -15,7 +15,6 @@ export default defineConfig(
}, },
{ {
"rules": { "rules": {
"no-empty": "off", // Temporarily disabled until codebase conformant
"no-empty-pattern": "off", // Temporarily disabled until codebase conformant "no-empty-pattern": "off", // Temporarily disabled until codebase conformant
"no-undef": "off", // Temporarily disabled until codebase conformant "no-undef": "off", // Temporarily disabled until codebase conformant
"no-useless-escape": "off", // Temporarily disabled until codebase conformant "no-useless-escape": "off", // Temporarily disabled until codebase conformant

View File

@ -82,8 +82,8 @@ export function adjustFontSizeToFit(
return () => { return () => {
cancelAnimationFrame(raf); cancelAnimationFrame(raf);
try { ro.disconnect(); } catch {} try { ro.disconnect(); } catch { /* Ignore errors */ }
try { mo.disconnect(); } catch {} try { mo.disconnect(); } catch { /* Ignore errors */ }
}; };
} }

View File

@ -94,6 +94,7 @@ class PDFWorkerManager {
try { try {
loadingTask.destroy(); loadingTask.destroy();
} catch (destroyError) { } catch (destroyError) {
// Ignore errors
} }
} }
throw error; throw error;
@ -166,6 +167,7 @@ class PDFWorkerManager {
try { try {
pdf.destroy(); pdf.destroy();
} catch (error) { } catch (error) {
// Ignore errors
} }
}); });