fix: resolve linting and TypeScript errors

- Remove unused faExpand import from ReadingDisplaySettings
- Fix TypeScript type errors in VideoEmbedProcessor
- Add explicit string[] type annotations for regex match results
- All linting and type checking now passes
This commit is contained in:
Gigi
2025-10-20 20:40:03 +02:00
parent b27f26b639
commit c6795f7c18
2 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react'
import { faHighlighter, faUnderline, faNetworkWired, faUserGroup, faUser, faAlignLeft, faAlignJustify, faExpand } from '@fortawesome/free-solid-svg-icons'
import { faHighlighter, faUnderline, faNetworkWired, faUserGroup, faUser, faAlignLeft, faAlignJustify } from '@fortawesome/free-solid-svg-icons'
import { UserSettings } from '../../services/settingsService'
import IconButton from '../IconButton'
import ColorPicker from '../ColorPicker'

View File

@@ -28,11 +28,11 @@ const VideoEmbedProcessor = forwardRef<HTMLDivElement, VideoEmbedProcessorProps>
// Find all video URLs in the HTML content
const videoUrlPattern = /https?:\/\/[^\s<>"']+\.(mp4|webm|ogg|mov|avi|mkv|m4v)(?:\?[^\s<>"']*)?/gi
const videoUrls = html.match(videoUrlPattern) || []
const videoUrls: string[] = html.match(videoUrlPattern) || []
// Also check for video URLs that might not have extensions but are classified as video
const allUrlPattern = /https?:\/\/[^\s<>"']+/gi
const allUrls = html.match(allUrlPattern) || []
const allUrls: string[] = html.match(allUrlPattern) || []
const videoUrlsWithoutExt = allUrls.filter(url => {
const classification = classifyUrl(url)
return classification.type === 'video' && !videoUrls.includes(url)
@@ -60,10 +60,10 @@ const VideoEmbedProcessor = forwardRef<HTMLDivElement, VideoEmbedProcessorProps>
}
const videoUrlPattern = /https?:\/\/[^\s<>"']+\.(mp4|webm|ogg|mov|avi|mkv|m4v)(?:\?[^\s<>"']*)?/gi
const videoUrls = html.match(videoUrlPattern) || []
const videoUrls: string[] = html.match(videoUrlPattern) || []
const allUrlPattern = /https?:\/\/[^\s<>"']+/gi
const allUrls = html.match(allUrlPattern) || []
const allUrls: string[] = html.match(allUrlPattern) || []
const videoUrlsWithoutExt = allUrls.filter(url => {
const classification = classifyUrl(url)
return classification.type === 'video' && !videoUrls.includes(url)