infra: add linting and formatting for js projects (#230)

* wip

* wip

* wip

* format

* wip(mobile): lint and format

* cleanup

* nits

* nits

* idiomatic react

* nit

* format all root files
This commit was merged in pull request #230.
This commit is contained in:
Arjun Patel
2026-06-02 07:44:24 -07:00
committed by GitHub
parent 2fe562ce2b
commit a8a0b7db1b
258 changed files with 7822 additions and 5195 deletions
@@ -1,4 +1,4 @@
import { useState, useEffect } from "react";
import { useState, useEffect } from 'react';
interface ScreenSourcePickerProps {
title?: string;
@@ -9,8 +9,8 @@ interface ScreenSourcePickerProps {
}
export function ScreenSourcePicker({
title = "Select a screen",
confirmLabel = "Select",
title = 'Select a screen',
confirmLabel = 'Select',
getSources,
onSelect,
onCancel,
@@ -23,18 +23,15 @@ export function ScreenSourcePicker({
getSources().then((result) => {
setSources(result);
setLoading(false);
// Auto-select if there's only one source.
if (result.length === 1) {
setSelectedId(result[0].id);
}
});
}, [getSources]);
// Auto-select if there's only one source
useEffect(() => {
if (!loading && sources.length === 1) {
setSelectedId(sources[0].id);
}
}, [loading, sources]);
const screens = sources.filter((s) => s.id.startsWith("screen:"));
const windows = sources.filter((s) => s.id.startsWith("window:"));
const screens = sources.filter((s) => s.id.startsWith('screen:'));
const windows = sources.filter((s) => s.id.startsWith('window:'));
return (
<div className="absolute inset-0 z-50 flex items-center justify-center bg-black/90">
@@ -119,8 +116,8 @@ function SourceSection({
onClick={() => onSelect(source.id)}
className={`overflow-hidden rounded-lg border-2 text-left transition-colors ${
selectedId === source.id
? "border-blue-500 bg-zinc-800"
: "border-transparent bg-zinc-800/50 hover:border-zinc-600"
? 'border-blue-500 bg-zinc-800'
: 'border-transparent bg-zinc-800/50 hover:border-zinc-600'
}`}
>
<img