diff --git a/frontends/nextjs/src/hooks/auth/auth-store.ts b/frontends/nextjs/src/hooks/auth/auth-store.ts index 1dcd0360b..2cc4e85c6 100644 --- a/frontends/nextjs/src/hooks/auth/auth-store.ts +++ b/frontends/nextjs/src/hooks/auth/auth-store.ts @@ -18,7 +18,7 @@ export class AuthStore { isLoading: false, } - private listeners = new Set<() => void>() + private readonly listeners = new Set<() => void>() private sessionCheckPromise: Promise | null = null getState(): AuthState { @@ -34,7 +34,7 @@ export class AuthStore { private setState(newState: AuthState): void { this.state = newState - this.listeners.forEach(listener => listener()) + this.listeners.forEach(listener => { listener(); }) } async ensureSessionChecked(): Promise { diff --git a/frontends/nextjs/src/hooks/useAuth.ts b/frontends/nextjs/src/hooks/useAuth.ts index 09f207e68..f737b434e 100644 --- a/frontends/nextjs/src/hooks/useAuth.ts +++ b/frontends/nextjs/src/hooks/useAuth.ts @@ -11,7 +11,7 @@ export function useAuth(): UseAuthReturn { const [state, setState] = useState(authStore.getState()) useEffect(() => { - const unsubscribe = authStore.subscribe(() => setState({ ...authStore.getState() })) + const unsubscribe = authStore.subscribe(() => { setState({ ...authStore.getState() }); }) void authStore.ensureSessionChecked() return unsubscribe }, []) diff --git a/frontends/nextjs/src/lib/components/component-catalog.ts b/frontends/nextjs/src/lib/components/component-catalog.ts index 08f0a18ad..c52ceaf8b 100644 --- a/frontends/nextjs/src/lib/components/component-catalog.ts +++ b/frontends/nextjs/src/lib/components/component-catalog.ts @@ -13,7 +13,7 @@ export interface ComponentCatalogEntry { * TODO: Implement full component catalog functionality */ export class ComponentCatalog { - private components = new Map() + private readonly components = new Map() register(name: string, entry: ComponentCatalogEntry): void { this.components.set(name, entry) diff --git a/frontends/nextjs/src/lib/components/component-registry.ts b/frontends/nextjs/src/lib/components/component-registry.ts index ba715b6a9..0cbc3f91d 100644 --- a/frontends/nextjs/src/lib/components/component-registry.ts +++ b/frontends/nextjs/src/lib/components/component-registry.ts @@ -14,7 +14,7 @@ export interface ComponentMetadata { * TODO: Implement full component registry functionality */ export class ComponentRegistry { - private registry = new Map() + private readonly registry = new Map() register(id: string, metadata: ComponentMetadata): void { this.registry.set(id, metadata) diff --git a/frontends/nextjs/src/lib/schema/schema-registry.ts b/frontends/nextjs/src/lib/schema/schema-registry.ts index d0948c6aa..7e5243c97 100644 --- a/frontends/nextjs/src/lib/schema/schema-registry.ts +++ b/frontends/nextjs/src/lib/schema/schema-registry.ts @@ -7,7 +7,7 @@ import { readFileSync, writeFileSync, existsSync } from 'fs' import { join } from 'path' export class SchemaRegistry { - private schemas: Map = new Map() + private readonly schemas: Map = new Map() packages: Record = {} register(schema: ModelSchema): void { @@ -40,7 +40,7 @@ export function loadSchemaRegistry(path?: string): SchemaRegistry { const { schemas, packages } = parsed as { schemas?: unknown; packages?: unknown } if (Array.isArray(schemas)) { - schemas.forEach((schema: ModelSchema) => schemaRegistry.register(schema)) + schemas.forEach((schema: ModelSchema) => { schemaRegistry.register(schema); }) } if (packages !== null && packages !== undefined && typeof packages === 'object') {