diff --git a/biome.json b/biome.json index 5b02afa2..cd808234 100644 --- a/biome.json +++ b/biome.json @@ -6,10 +6,7 @@ "linter": { "enabled": true, "rules": { - "recommended": true, - "correctness": { - "useExhaustiveDependencies": "off" - } + "recommended": true } }, "formatter": { diff --git a/src/components/AlertMessages.tsx b/src/components/AlertMessages.tsx index 7423f845..fff519ec 100644 --- a/src/components/AlertMessages.tsx +++ b/src/components/AlertMessages.tsx @@ -12,9 +12,9 @@ const Reconnect: React.FC = () => { const onClose = (): void => { dispatch(setSoraReconnecting(false)) } + // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { dispatch(reconnectSora()) - // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/src/components/Video/Video.tsx b/src/components/Video/Video.tsx index 10c78619..aa156b92 100644 --- a/src/components/Video/Video.tsx +++ b/src/components/Video/Video.tsx @@ -15,7 +15,8 @@ const VideoElement: React.FC = (props) => { const { displayResolution, stream, mute, audioOutput, setHeight } = props const videoRef = useRef(null) const videoSize = getVideoSizeByResolution(displayResolution) - useEffect(() => { + // biome-ignore lint/correctness/useExhaustiveDependencies: +useEffect(() => { const resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => { entries.filter((entry) => { setHeight(entry.contentRect.height) @@ -30,7 +31,6 @@ const VideoElement: React.FC = (props) => { return () => { resizeObserver.disconnect() } - // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { @@ -39,7 +39,8 @@ const VideoElement: React.FC = (props) => { } }, [mute]) - useEffect(() => { + // biome-ignore lint/correctness/useExhaustiveDependencies: +useEffect(() => { if (videoRef.current && stream) { // Chrome で first video frame まで音声が出力されない現象のワークアラウンド // 一旦 video tracks を disabled にしておき、 loadedmetadata イベントで有効にする @@ -64,7 +65,6 @@ const VideoElement: React.FC = (props) => { } else if (videoRef.current && stream === null) { videoRef.current.srcObject = null } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [stream]) if (audioOutput && videoRef.current?.setSinkId && stream && stream.getAudioTracks().length > 0) { diff --git a/src/pages/devtools.tsx b/src/pages/devtools.tsx index bff7409a..8be10480 100644 --- a/src/pages/devtools.tsx +++ b/src/pages/devtools.tsx @@ -12,6 +12,7 @@ import { MediacaptureRegionTarget } from '@/components/MediacaptureRegionTarget' const Devtools: React.FC = () => { const dispatch = useAppDispatch() + // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { dispatch(setInitialParameter()) dispatch(setMediaDevices()) @@ -19,7 +20,6 @@ const Devtools: React.FC = () => { return () => { dispatch(disconnectSora()) } - // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( <>