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,6 +1,6 @@
import { useSuspendPlayback } from "@/hooks/use-suspend-playback";
import { useEffect } from "react";
import { createPortal } from "react-dom";
import { useSuspendPlayback } from '@/hooks/use-suspend-playback';
import { useEffect } from 'react';
import { createPortal } from 'react-dom';
export interface KeybindingEntry {
keys: string[];
@@ -23,21 +23,22 @@ export function KeybindingsOverlay({
open,
onClose,
groups,
title = "Keyboard Shortcuts",
title = 'Keyboard Shortcuts',
}: KeybindingsOverlayProps) {
useSuspendPlayback(open, "keybindings");
useSuspendPlayback(open, 'keybindings');
useEffect(() => {
if (!open) return;
const handler = (e: KeyboardEvent) => {
if (e.key === "Escape" || e.key === "?") {
if (e.key === 'Escape' || e.key === '?') {
e.preventDefault();
e.stopPropagation();
onClose();
}
};
window.addEventListener("keydown", handler, { capture: true });
return () => window.removeEventListener("keydown", handler, { capture: true });
window.addEventListener('keydown', handler, { capture: true });
return () =>
window.removeEventListener('keydown', handler, { capture: true });
}, [open, onClose]);
if (!open) return null;
@@ -56,11 +57,11 @@ export function KeybindingsOverlay({
<span className="text-xs text-white/30">
<kbd className="rounded bg-white/10 px-1.5 py-0.5 font-mono text-xs">
Esc
</kbd>{" "}
or{" "}
</kbd>{' '}
or{' '}
<kbd className="rounded bg-white/10 px-1.5 py-0.5 font-mono text-xs">
?
</kbd>{" "}
</kbd>{' '}
to close
</span>
</div>