From 96e9024694ccfe870d8047804533d123a2a80ade Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 23 Feb 2022 13:10:50 +0100 Subject: [PATCH] chore(eslint): disable types on complicated event handlers --- app/javascript/components/shared/maplibre/hooks.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/javascript/components/shared/maplibre/hooks.ts b/app/javascript/components/shared/maplibre/hooks.ts index 42960da46..56a59ddf3 100644 --- a/app/javascript/components/shared/maplibre/hooks.ts +++ b/app/javascript/components/shared/maplibre/hooks.ts @@ -50,12 +50,16 @@ export function useMapEvent( const map = useMapLibre(); return useEffect(() => { if (target) { + // event typing is hard + // eslint-disable-next-line @typescript-eslint/no-explicit-any map.on(eventName as keyof MapLayerEventType, target, callback as any); } else { map.on(eventName, callback); } return () => { if (target) { + // event typing is hard + // eslint-disable-next-line @typescript-eslint/no-explicit-any map.off(eventName as keyof MapLayerEventType, target, callback as any); } else { map.off(eventName, callback);