You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Tools: Apply @typescript-eslint/ban-ts-comment rule
This commit is contained in:
@@ -7,7 +7,7 @@ function useEventListener(
|
||||
element?: any
|
||||
) {
|
||||
// Create a ref that stores handler
|
||||
const savedHandler = useRef();
|
||||
const savedHandler = useRef<any>();
|
||||
|
||||
useEffect(() => {
|
||||
// Define the listening target
|
||||
@@ -25,7 +25,6 @@ function useEventListener(
|
||||
const eventListener = (event: Event) => {
|
||||
// eslint-disable-next-line no-extra-boolean-cast
|
||||
if (!!savedHandler?.current) {
|
||||
// @ts-ignore
|
||||
savedHandler.current(event);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user