Fix ESLint errors

This commit is contained in:
adilallo
2026-01-28 11:38:38 -07:00
parent 2e027f5bb2
commit 6b8d646f8a
82 changed files with 217 additions and 193 deletions
+8 -8
View File
@@ -28,20 +28,20 @@ interface AnalyticsEvent {
}
interface UseAnalyticsReturn {
trackEvent: (event: AnalyticsEvent) => void;
trackEvent: (_event: AnalyticsEvent) => void;
trackCustomEvent: (
event: string,
data: Record<string, unknown>,
callback?: (data: Record<string, unknown>) => void,
_event: string,
_data: Record<string, unknown>,
_callback?: (_data: Record<string, unknown>) => void,
) => void;
}
declare global {
interface Window {
gtag?: (
command: string,
eventName: string,
params?: Record<string, unknown>,
_command: string,
_eventName: string,
_params?: Record<string, unknown>,
) => void;
}
}
@@ -64,7 +64,7 @@ export function useAnalytics(): UseAnalyticsReturn {
const trackCustomEvent = (
event: string,
data: Record<string, unknown>,
callback?: (data: Record<string, unknown>) => void,
callback?: (_data: Record<string, unknown>) => void,
) => {
// Execute custom callback if provided
if (callback) {
+1 -1
View File
@@ -19,7 +19,7 @@ import { useEffect, RefObject } from "react";
*/
export function useClickOutside(
refs: Array<RefObject<HTMLElement>>,
handler: (event: MouseEvent | TouchEvent) => void,
handler: (_event: MouseEvent | TouchEvent) => void,
enabled: boolean = true,
): void {
useEffect(() => {
+1 -1
View File
@@ -24,7 +24,7 @@ export interface UseComponentStylesOptions {
error?: boolean;
sizeStyles: SizeStyleConfig;
stateStyles: StateStyleConfig;
getStateStyles?: (params: {
getStateStyles?: (_params: {
state?: string;
disabled: boolean;
error: boolean;
+6 -6
View File
@@ -19,15 +19,15 @@ import { useCallback } from "react";
* ```
*/
interface FormFieldHandlers<T = HTMLElement> {
onChange?: (e: React.ChangeEvent<T>) => void;
onFocus?: (e: React.FocusEvent<T>) => void;
onBlur?: (e: React.FocusEvent<T>) => void;
onChange?: (_e: React.ChangeEvent<T>) => void;
onFocus?: (_e: React.FocusEvent<T>) => void;
onBlur?: (_e: React.FocusEvent<T>) => void;
}
interface UseFormFieldReturn<T = HTMLElement> {
handleChange: (e: React.ChangeEvent<T>) => void;
handleFocus: (e: React.FocusEvent<T>) => void;
handleBlur: (e: React.FocusEvent<T>) => void;
handleChange: (_e: React.ChangeEvent<T>) => void;
handleFocus: (_e: React.FocusEvent<T>) => void;
handleBlur: (_e: React.FocusEvent<T>) => void;
}
export function useFormField<T extends HTMLElement = HTMLElement>(
+1 -1
View File
@@ -3,7 +3,7 @@ import { useState, useCallback, useMemo } from "react";
/**
* Validation rule function type
*/
export type ValidationRule<T = string> = (value: T) => string | null;
export type ValidationRule<T = string> = (_value: T) => string | null;
/**
* Validation rules for common patterns
+2
View File
@@ -51,6 +51,8 @@ export function useMediaQuery(
}
const media = window.matchMedia(mediaQuery);
// Initialize matches synchronously - this is safe for media queries
// eslint-disable-next-line react-hooks/rules-of-hooks
setMatches(media.matches);
// Create listener for changes