chore: Apply linting rules and add git hok (#611)

Co-authored-by: Fredrik Burmester <fredrik.burmester@gmail.com>
This commit is contained in:
lostb1t
2025-03-16 18:01:12 +01:00
committed by GitHub
parent 2688e1b981
commit 92513e234f
268 changed files with 9197 additions and 8394 deletions

View File

@@ -1,6 +1,6 @@
import { useSettings } from "@/utils/atoms/settings";
import { useCallback, useMemo } from "react";
import { Platform } from "react-native";
import { useSettings } from "@/utils/atoms/settings";
const Haptics = !Platform.isTV ? require("expo-haptics") : null;
export type HapticFeedbackType =
@@ -25,7 +25,7 @@ export const useHaptic = (feedbackType: HapticFeedbackType = "selection") => {
? () => {}
: () => Haptics.impactAsync(type);
},
[]
[],
);
const createNotificationFeedback = useCallback(
(type: typeof Haptics.NotificationFeedbackType) => {
@@ -33,7 +33,7 @@ export const useHaptic = (feedbackType: HapticFeedbackType = "selection") => {
? () => {}
: () => Haptics.notificationAsync(type);
},
[]
[],
);
const hapticHandlers = useMemo(
@@ -46,14 +46,14 @@ export const useHaptic = (feedbackType: HapticFeedbackType = "selection") => {
? () => {}
: Haptics.selectionAsync,
success: createNotificationFeedback(
Haptics.NotificationFeedbackType.Success
Haptics.NotificationFeedbackType.Success,
),
warning: createNotificationFeedback(
Haptics.NotificationFeedbackType.Warning
Haptics.NotificationFeedbackType.Warning,
),
error: createNotificationFeedback(Haptics.NotificationFeedbackType.Error),
}),
[createHapticHandler, createNotificationFeedback]
[createHapticHandler, createNotificationFeedback],
);
if (settings?.disableHapticFeedback) {