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 fce95a2 commit 94319e8
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 23 deletions.
9 changes: 2 additions & 7 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"useExhaustiveDependencies": "off"
},
"a11y": {
"noSvgWithoutTitle": "off",
"useValidAnchor": "off",
"useAnchorContent": "off"
"noSvgWithoutTitle": "off"
}
}
},
Expand Down Expand Up @@ -50,4 +45,4 @@
"quoteProperties": "asNeeded"
}
}
}
}
15 changes: 7 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
const nextConfig = {
output: "export",
output: 'export',
// distDir: 'dist',
// eslint-disable-next-line no-undef
distDir: process.env.NODE_ENV === 'production' ? 'dist' : 'dev',
compress: true,
swcMinify: false,
generateBuildId: async () => "sora_devtools",
generateBuildId: async () => 'sora_devtools',
webpack: (config) => {
config.resolve.fallback = {
'lyra.wasm': false,
'lyra.worker.js': false,
};
return config;
}
};
}
return config
},
}

module.exports = nextConfig;
module.exports = nextConfig
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
1 change: 1 addition & 0 deletions src/components/DebugPane/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const Message: React.FC<Props> = (props) => {
<div className="d-flex justify-content-between align-items-center text-break">
<a
className={`debug-title ${disabled ? 'disabled' : ''}`}
// biome-ignore lint/a11y/useValidAnchor: <explanation>
onClick={() => setShow(!show)}
aria-controls={ariaControls}
aria-expanded={show}
Expand Down
3 changes: 3 additions & 0 deletions src/components/DevtoolsPane/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ const RowSignalingOptions: React.FC = () => {
return (
<Row className="form-row">
<Col>
{/* biome-ignore lint/a11y/useValidAnchor: <explanation> */}
<a href="#" className={linkClassNames.join(' ')} onClick={onClick}>
Signaling options
</a>
Expand Down Expand Up @@ -261,6 +262,7 @@ const RowAdvancedSignalingOptions: React.FC = () => {
return (
<Row className="form-row">
<Col>
{/* biome-ignore lint/a11y/useValidAnchor: <explanation> */}
<a href="#" className={linkClassNames.join(' ')} onClick={onClick}>
Advanced signaling options
</a>
Expand Down Expand Up @@ -341,6 +343,7 @@ const RowMediaOptions: React.FC = () => {
return (
<Row className="form-row">
<Col>
{/* biome-ignore lint/a11y/useValidAnchor: <explanation> */}
<a href="#" className={linkClassNames.join(' ')} onClick={onClick}>
Media options
</a>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Header/DownloadReportButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ export const DownloadReportButton: React.FC = () => {
defaultValue="Download report"
onClick={onClick}
/>
{/* biome-ignore lint/a11y/useAnchorContent: <explanation> */}
{/* biome-ignore lint/a11y/useValidAnchor: <explanation> */}
<a ref={anchorRef} style={{ display: 'none' }} />
</>
)
Expand Down
4 changes: 2 additions & 2 deletions src/components/Video/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const VideoElement: React.FC<VideoProps> = (props) => {
const { displayResolution, stream, mute, audioOutput, setHeight } = props
const videoRef = useRef<CustomHTMLVideoElement>(null)
const videoSize = getVideoSizeByResolution(displayResolution)
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
useEffect(() => {
const resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => {
entries.filter((entry) => {
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,6 +39,7 @@ const VideoElement: React.FC<VideoProps> = (props) => {
}
}, [mute])

// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
useEffect(() => {
if (videoRef.current && stream) {
// Chrome で first video frame まで音声が出力されない現象のワークアラウンド
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
1 change: 0 additions & 1 deletion src/components/Video/VolumeVisualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ const Visualizer: React.FC<VisualizerProps> = (props) => {
cancelAnimationFrame(animationFrameId)
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.stream])
return (
<canvas
Expand Down
1 change: 0 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ const MyApp = ({ Component, pageProps }: AppProps): ReactElement => {
)
}

// eslint-disable-next-line import/no-default-export
export default MyApp
3 changes: 1 addition & 2 deletions 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 All @@ -39,5 +39,4 @@ const Devtools: React.FC = () => {
)
}

// eslint-disable-next-line import/no-default-export
export default Devtools
1 change: 0 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,4 @@ const Index: React.FC = () => {
)
}

// eslint-disable-next-line import/no-default-export
export default Index

0 comments on commit 94319e8

Please sign in to comment.