chore: linting fixes && github actions for linting (#612)

This commit is contained in:
Ahmed Sbai
2025-03-31 07:44:10 +02:00
committed by GitHub
parent 16b834cf71
commit b9bb109f4a
105 changed files with 604 additions and 570 deletions

View File

@@ -2,7 +2,7 @@ import { requireNativeViewManager } from "expo-modules-core";
import * as React from "react";
import { VideoPlayer, useSettings } from "@/utils/atoms/settings";
import { Platform } from "react-native";
import { Platform, ViewStyle } from "react-native";
import type {
VlcPlayerSource,
VlcPlayerViewProps,
@@ -22,7 +22,7 @@ const NativeView = React.forwardRef<NativeViewRef, VlcPlayerViewProps>(
const [settings] = useSettings();
if (Platform.OS === "ios" || Platform.isTVOS) {
if (settings.defaultPlayer == VideoPlayer.VLC_3) {
if (settings.defaultPlayer === VideoPlayer.VLC_3) {
console.log("[Apple] Using Vlc Player 3");
return <VLC3ViewManager {...props} ref={ref} />;
}
@@ -118,7 +118,9 @@ const VlcPlayerView = React.forwardRef<VlcPlayerViewRef, VlcPlayerViewProps>(
} = props;
const processedSource: VlcPlayerSource =
typeof source === "string" ? { uri: source } : source;
typeof source === "string"
? ({ uri: source } as unknown as VlcPlayerSource)
: source;
if (processedSource.startPosition !== undefined) {
processedSource.startPosition = Math.floor(processedSource.startPosition);
@@ -129,7 +131,7 @@ const VlcPlayerView = React.forwardRef<VlcPlayerViewRef, VlcPlayerViewProps>(
{...otherProps}
ref={nativeRef}
source={processedSource}
style={[{ width: "100%", height: "100%" }, style]}
style={[{ width: "100%", height: "100%" }, style as ViewStyle]}
progressUpdateInterval={progressUpdateInterval}
paused={paused}
muted={muted}