sparkletown/sparkle

View on GitHub
scripts/migration/v0.0.2__migrate-venue-chats.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Function cleanupThreads has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const cleanupThreads = async (
  firestore: FirebaseFirestore.Firestore,
  chatsRef: CollectionReference
) => {
  const { docs: threadMessages } = await chatsRef.orderBy("threadId").get();
Severity: Minor
Found in scripts/migration/v0.0.2__migrate-venue-chats.ts - About 1 hr to fix

Function updateChatMessagesCounter has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const updateChatMessagesCounter = async (
  firestore: FirebaseFirestore.Firestore,
  venueRef: DocumentReference
) => {
  const batch = firestore.batch();
Severity: Minor
Found in scripts/migration/v0.0.2__migrate-venue-chats.ts - About 1 hr to fix

There are no issues that match your filters.

Category
Status