From 292d802e116a11c297acf08b460c8535ee711024 Mon Sep 17 00:00:00 2001 From: Buffy Date: Thu, 23 Jul 2026 13:20:38 +0000 Subject: [PATCH] fix(lint): assign anonymous default exports to named consts Resolves import/no-anonymous-default-export warnings from next/core-web-vitals in lib/actions/cached-api.js and lib/utils/cloudinaryUpload.js. The default exports were unused across the codebase; converting them to named consts before exporting silences the lint warnings without changing runtime behavior. --- lib/actions/cached-api.js | 4 +++- lib/utils/cloudinaryUpload.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/actions/cached-api.js b/lib/actions/cached-api.js index 57884e1f..cd6b6598 100644 --- a/lib/actions/cached-api.js +++ b/lib/actions/cached-api.js @@ -247,7 +247,7 @@ export const clearAllCaches = () => { console.log("✅ All API caches cleared"); }; -export default { +const cachedAPI = { courses: coursesAPI, books: booksAPI, spaces: spacesAPI, @@ -256,3 +256,5 @@ export default { search: searchAPI, clearAll: clearAllCaches, }; + +export default cachedAPI; diff --git a/lib/utils/cloudinaryUpload.js b/lib/utils/cloudinaryUpload.js index 8c839f0e..552b2b3b 100644 --- a/lib/utils/cloudinaryUpload.js +++ b/lib/utils/cloudinaryUpload.js @@ -181,7 +181,7 @@ export const formatFileSize = (bytes) => { return Math.round((bytes / Math.pow(k, i)) * 100) / 100 + " " + sizes[i]; }; -export default { +const cloudinaryUpload = { uploadToCloudinary, uploadWithProgress, uploadMultipleFiles, @@ -189,3 +189,5 @@ export default { getResourceType, formatFileSize, }; + +export default cloudinaryUpload;