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))
}
}