Switched to biome.

This commit is contained in:
Mike Cao 2025-11-20 20:56:16 -08:00
parent abc1b50ad0
commit 15fda927ce
11 changed files with 184 additions and 1167 deletions

View file

@ -1,10 +1,10 @@
import { ClickHouseClient, createClient } from '@clickhouse/client';
import { type ClickHouseClient, createClient } from '@clickhouse/client';
import { formatInTimeZone } from 'date-fns-tz';
import debug from 'debug';
import { CLICKHOUSE } from '@/lib/db';
import { DEFAULT_PAGE_SIZE, FILTER_COLUMNS, OPERATORS } from './constants';
import { filtersObjectToArray } from './params';
import { QueryFilters, QueryOptions } from './types';
import type { QueryFilters, QueryOptions } from './types';
export const CLICKHOUSE_DATE_FORMATS = {
utc: '%Y-%m-%dT%H:%i:%SZ',

View file

@ -1,12 +1,12 @@
import { z } from 'zod';
import { checkAuth } from '@/lib/auth';
import { DEFAULT_PAGE_SIZE, FILTER_COLUMNS } from '@/lib/constants';
import { getAllowedUnits, getMinimumUnit, maxDate, parseDateRange } from '@/lib/date';
import { fetchWebsite } from '@/lib/load';
import { filtersArrayToObject } from '@/lib/params';
import { badRequest, unauthorized } from '@/lib/response';
import { QueryFilters } from '@/lib/types';
import type { QueryFilters } from '@/lib/types';
import { getWebsiteSegment } from '@/queries/prisma';
import { z } from 'zod';
export async function parseRequest(
request: Request,

View file

@ -1,4 +1,4 @@
export function setItem(key: string, data: any, session?: boolean): void {
export function setItem(key: string, data: any, session?: boolean) {
if (typeof window !== 'undefined' && data) {
return (session ? sessionStorage : localStorage).setItem(key, JSON.stringify(data));
}
@ -18,7 +18,7 @@ export function getItem(key: string, session?: boolean): any {
}
}
export function removeItem(key: string, session?: boolean): void {
export function removeItem(key: string, session?: boolean) {
if (typeof window !== 'undefined') {
return (session ? sessionStorage : localStorage).removeItem(key);
}