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
+24 -9
View File
@@ -1,14 +1,27 @@
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { createParticle, createStreamParticle } from "@/lib/firestore-particles";
import { CONTAINER_TYPES, type NetworkUsage, type ParticleType, type ParticlePropertiesMap } from "@/api/types";
import { parseParticlePath, particlePath, ParticlePath, toFirestoreChildrenPath } from "@/lib/particle-path";
import { QuotaExceededError } from "@/lib/errors";
import { useMutation, useQueryClient } from '@tanstack/react-query';
import {
createParticle,
createStreamParticle,
} from '@/lib/firestore-particles';
import {
CONTAINER_TYPES,
type NetworkUsage,
type ParticleType,
type ParticlePropertiesMap,
} from '@/api/types';
import {
parseParticlePath,
particlePath,
ParticlePath,
toFirestoreChildrenPath,
} from '@/lib/particle-path';
import { QuotaExceededError } from '@/lib/errors';
import {
isUsageExhausted,
networkUsageQueryKey,
useBumpNetworkUsage,
useInvalidateNetworkUsage,
} from "./use-network-usage";
} from './use-network-usage';
interface CreateParticleParams<T extends ParticleType = ParticleType> {
// Path to which the new particle will be added as a child
@@ -32,7 +45,9 @@ export function useCreateParticle() {
// Containers aren't counted server-side, so we block them here
if (!CONTAINER_TYPES.has(params.type)) {
const cached = qc.getQueryData<NetworkUsage>(networkUsageQueryKey(networkId));
const cached = qc.getQueryData<NetworkUsage>(
networkUsageQueryKey(networkId),
);
if (isUsageExhausted(cached)) {
throw new QuotaExceededError(networkId);
}
@@ -58,7 +73,7 @@ export function useCreateParticle() {
type CreateStreamParticleParams = {
networkId: string;
properties: ParticlePropertiesMap["stream"];
properties: ParticlePropertiesMap['stream'];
createdByHumanId: string;
visibleTo?: string[];
};
@@ -74,6 +89,6 @@ export function useCreateStreamParticle() {
params.createdByHumanId,
params.visibleTo,
);
}
},
});
}