chore(ui): finish eslint v9 migration

This commit is contained in:
psychedelicious
2025-07-17 21:27:27 +10:00
parent 875cde13ae
commit 5d9e078043
49 changed files with 112 additions and 109 deletions

View File

@@ -1,3 +1,5 @@
export const preventDefault = (e: React.MouseEvent) => {
import type { MouseEvent } from 'react';
export const preventDefault = (e: MouseEvent) => {
e.preventDefault();
};

View File

@@ -1,10 +1,11 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type React from 'react';
import { memo } from 'react';
/**
* A typed version of React.memo, useful for components that take generics.
*/
export const typedMemo: <T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>>(
export const typedMemo: <T extends keyof React.JSX.IntrinsicElements | React.JSXElementConstructor<any>>(
component: T,
propsAreEqual?: (prevProps: React.ComponentProps<T>, nextProps: React.ComponentProps<T>) => boolean
) => T & { displayName?: string } = memo;