Skip to content

Commit

Permalink
biome-ignore で逃げる
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Nov 17, 2023
1 parent 6fee2bf commit d96624f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"useExhaustiveDependencies": "off"
}
"recommended": true
}
},
"formatter": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/AlertMessages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const Reconnect: React.FC = () => {
const onClose = (): void => {
dispatch(setSoraReconnecting(false))
}
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
useEffect(() => {
dispatch(reconnectSora())
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
return (
<Toast delay={20000} onClose={onClose}>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Video/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const VideoElement: React.FC<VideoProps> = (props) => {
const { displayResolution, stream, mute, audioOutput, setHeight } = props
const videoRef = useRef<CustomHTMLVideoElement>(null)
const videoSize = getVideoSizeByResolution(displayResolution)
useEffect(() => {
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
useEffect(() => {
const resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => {
entries.filter((entry) => {
setHeight(entry.contentRect.height)
Expand All @@ -30,7 +31,6 @@ const VideoElement: React.FC<VideoProps> = (props) => {
return () => {
resizeObserver.disconnect()
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])

useEffect(() => {
Expand All @@ -39,7 +39,8 @@ const VideoElement: React.FC<VideoProps> = (props) => {
}
}, [mute])

useEffect(() => {
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
useEffect(() => {
if (videoRef.current && stream) {
// Chrome で first video frame まで音声が出力されない現象のワークアラウンド
// 一旦 video tracks を disabled にしておき、 loadedmetadata イベントで有効にする
Expand All @@ -64,7 +65,6 @@ const VideoElement: React.FC<VideoProps> = (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) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/devtools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import { MediacaptureRegionTarget } from '@/components/MediacaptureRegionTarget'

const Devtools: React.FC = () => {
const dispatch = useAppDispatch()
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
useEffect(() => {
dispatch(setInitialParameter())
dispatch(setMediaDevices())
dispatch(initLyra())
return () => {
dispatch(disconnectSora())
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
return (
<>
Expand Down

0 comments on commit d96624f

Please sign in to comment.