mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
chore(ci): eslint + prettier → biome (#325)
This commit is contained in:
@@ -53,7 +53,6 @@ const DefaultVideoComponent: ElementType<
|
||||
> = forwardRef<any, any>(({ children, ...props }, ref) => {
|
||||
const { updateMediaElement } = useMediaStateOwner(ref, createMediaPlaybackController);
|
||||
return (
|
||||
// eslint-disable-next-line jsx-a11y/media-has-caption
|
||||
<video
|
||||
{...props}
|
||||
ref={(mediaEl) => {
|
||||
|
||||
@@ -34,7 +34,6 @@ export interface MediaContainerProps extends PropsWithChildren<HTMLProps<HTMLDiv
|
||||
* return <div ref={containerRef}>{children}</div>;
|
||||
* };
|
||||
*/
|
||||
// eslint-disable-next-line react-refresh/only-export-components
|
||||
export function useMediaContainerRef(): RefCallback<HTMLElement | null> {
|
||||
const mediaStore = useMediaStore();
|
||||
|
||||
@@ -168,7 +167,6 @@ export const MediaContainer: FC<MediaContainerProps> = forwardRef(
|
||||
}, [getMediaElement, isUserActive, scheduleUserInactive]);
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
||||
<div
|
||||
ref={composedRef}
|
||||
onClick={handleClick}
|
||||
|
||||
@@ -111,7 +111,6 @@ export function usePopoverTriggerProps(
|
||||
}
|
||||
|
||||
export function renderPopoverTrigger(props: { child: JSX.Element; triggerProps: Record<string, any> }): JSX.Element {
|
||||
// eslint-disable-next-line react/no-clone-element
|
||||
return cloneElement(props.child, props.triggerProps);
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,6 @@ export function useTooltipTriggerProps(
|
||||
}
|
||||
|
||||
export function renderTooltipTrigger(props: { child: JSX.Element; triggerProps: Record<string, any> }): JSX.Element {
|
||||
// eslint-disable-next-line react/no-clone-element
|
||||
return cloneElement(props.child, props.triggerProps);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ export const Video: React.ForwardRefExoticComponent<
|
||||
const mediaRefCallback = useMediaRef();
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line jsx-a11y/media-has-caption
|
||||
<video {...props} ref={mediaRefCallback}>
|
||||
{children}
|
||||
</video>
|
||||
|
||||
@@ -18,7 +18,7 @@ import { useDebugValue, useEffect, useMemo, useRef, useSyncExternalStore } from
|
||||
*/
|
||||
function isPolyfill(x: any, y: any) {
|
||||
return (
|
||||
(x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare
|
||||
(x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,7 @@ function composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {
|
||||
* Accepts callback refs and RefObject(s)
|
||||
*/
|
||||
function useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
return React.useCallback(composeRefs(...refs), refs);
|
||||
return React.useCallback(composeRefs(...refs), [...refs]);
|
||||
}
|
||||
|
||||
export { composeRefs, useComposedRefs };
|
||||
|
||||
Reference in New Issue
Block a user