fix: react-doctor unused-export 141→~80 (remove dead exports, enums/marketing unused, inline campaignStatusEnum)

This commit is contained in:
Nora
2026-06-26 05:25:36 -06:00
parent 0ea11e4db6
commit 13d15883b1
34 changed files with 106 additions and 174 deletions
+6 -6
View File
@@ -14,7 +14,7 @@ export function formatDate(iso: string | null | undefined): string {
/**
* Format an ISO datetime string as "Jan 5, 2025 at 2:30 PM"
*/
export function formatDateTime(iso: string | null | undefined): string {
function formatDateTime(iso: string | null | undefined): string {
if (!iso) return "—";
const d = new Date(iso);
if (isNaN(d.getTime())) return "—";
@@ -26,7 +26,7 @@ export function formatDateTime(iso: string | null | undefined): string {
/**
* Format an ISO date string as YYYY-MM-DD (for form inputs, export filenames)
*/
export function formatDateISO(iso: string | null | undefined): string {
function formatDateISO(iso: string | null | undefined): string {
if (!iso) return "";
const d = new Date(iso);
if (isNaN(d.getTime())) return "";
@@ -36,7 +36,7 @@ export function formatDateISO(iso: string | null | undefined): string {
/**
* Format as YYYY-MM-DDTHH:MM for datetime-local input min values
*/
export function formatDateTimeLocal(iso: string | null | undefined): string {
function formatDateTimeLocal(iso: string | null | undefined): string {
if (!iso) return "";
const d = new Date(iso);
if (isNaN(d.getTime())) return "";
@@ -46,7 +46,7 @@ export function formatDateTimeLocal(iso: string | null | undefined): string {
/**
* Relative time: "5m ago", "2h ago", "3d ago"
*/
export function timeAgo(iso: string | null | undefined): string {
function timeAgo(iso: string | null | undefined): string {
if (!iso) return "Never";
const diff = Date.now() - new Date(iso).getTime();
if (diff < 0) return "Just now";
@@ -66,14 +66,14 @@ export function timeAgo(iso: string | null | undefined): string {
/**
* Month name from 0-based index (for selector options)
*/
export function getMonthName(monthIndex: number): string {
function getMonthName(monthIndex: number): string {
return new Date(0, monthIndex).toLocaleString("en-US", { month: "long" });
}
/**
* Short month name: "Jan", "Feb"
*/
export function getMonthNameShort(monthIndex: number): string {
function getMonthNameShort(monthIndex: number): string {
return new Date(0, monthIndex).toLocaleString("en-US", { month: "short" });
}