fix: resolve all linting and type errors

- Fix empty catch blocks by adding explanatory comments
- Remove unused variables or prefix with underscore
- Remove orphaned object literals from removed console.log statements
- Fix unnecessary dependency array entries
- Ensure all empty code blocks have comments to satisfy eslint no-empty rule
This commit is contained in:
Gigi
2025-10-19 22:41:35 +02:00
parent 4202807777
commit adf73cb9d1
25 changed files with 54 additions and 118 deletions

View File

@@ -10,9 +10,6 @@ export function applyHighlightsToHTML(
highlightStyle: 'marker' | 'underline' = 'marker'
): string {
if (!html || highlights.length === 0) {
htmlLength: html?.length,
highlightsCount: highlights.length
})
return html
}
@@ -30,8 +27,6 @@ export function applyHighlightsToHTML(
})
let appliedCount = 0
for (const highlight of highlights) {
const searchText = highlight.content.trim()
if (!searchText) {
@@ -51,9 +46,7 @@ export function applyHighlightsToHTML(
const found = tryMarkInTextNodes(textNodes, searchText, highlight, false, highlightStyle) ||
tryMarkInTextNodes(textNodes, searchText, highlight, true, highlightStyle)
if (found) {
appliedCount++
} else {
if (!found) {
console.warn('❌ Could not find match for highlight:', searchText.substring(0, 50))
}
}

View File

@@ -43,7 +43,7 @@ export function applyTheme(
root.classList.add(`light-${lightColorTheme}`)
// Listen for system theme changes
mediaQueryListener = (e: MediaQueryListEvent) => {
mediaQueryListener = () => {
// The CSS media query handles the color changes automatically
}

View File

@@ -34,7 +34,9 @@ export function filterHighlightsByUrl(highlights: Highlight[], selectedUrl: stri
normalizedRef.includes(normalizedSelected)
if (matches) {
// URLs match
} else {
// URLs do not match
}
return matches