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,10 +1,10 @@
import { useCallback, useState } from "react";
import { toast } from "sonner";
import { ConfirmDestructiveOverlay } from "@/components/confirm-destructive-overlay";
import { softDeleteParticle } from "@/lib/firestore-particles";
import { particlePath, toFirestoreDocPath } from "@/lib/particle-path";
import type { Particle } from "@/api/types";
import { useSuspendPlayback } from "@/hooks/use-suspend-playback";
import { useCallback, useState } from 'react';
import { toast } from 'sonner';
import { ConfirmDestructiveOverlay } from '@/components/confirm-destructive-overlay';
import { softDeleteParticle } from '@/lib/firestore-particles';
import { particlePath, toFirestoreDocPath } from '@/lib/particle-path';
import type { Particle } from '@/api/types';
import { useSuspendPlayback } from '@/hooks/use-suspend-playback';
interface DeleteParticleOverlayProps {
networkId: string;
@@ -21,7 +21,7 @@ export function DeleteParticleOverlay({
userId,
onClose,
}: DeleteParticleOverlayProps) {
useSuspendPlayback(true, "delete-particle");
useSuspendPlayback(true, 'delete-particle');
const [deleting, setDeleting] = useState(false);
@@ -33,10 +33,11 @@ export function DeleteParticleOverlay({
particlePath(networkId, [streamId, particle.id]),
);
await softDeleteParticle(docPath, userId);
toast.success("Particle deleted");
toast.success('Particle deleted');
onClose();
} catch (e) {
const message = e instanceof Error ? e.message : "Failed to delete particle";
const message =
e instanceof Error ? e.message : 'Failed to delete particle';
toast.error(message);
setDeleting(false);
}