Skip to content

fix(lint): assign anonymous default exports to named consts - #135

Open
Whiznificent wants to merge 1 commit into
Deen-Bridge:mainfrom
Whiznificent:fix/lint-anonymous-default-exports
Open

fix(lint): assign anonymous default exports to named consts#135
Whiznificent wants to merge 1 commit into
Deen-Bridge:mainfrom
Whiznificent:fix/lint-anonymous-default-exports

Conversation

@Whiznificent

@Whiznificent Whiznificent commented Jul 23, 2026

Copy link
Copy Markdown

Summary

Resolves `import/no-anonymous-default-export` warnings from `next/core-web-vitals` ESLint config.

Changes

  • `lib/actions/cached-api.js`: Converted anonymous `export default { ... }` to a named const (`cachedAPI`) before exporting.
  • `lib/utils/cloudinaryUpload.js`: Same pattern with `const cloudinaryUpload = { ... }`.

Verification

  • βœ… `npm run lint` β€” 0 warnings, 0 errors
  • βœ… `npm run build` β€” succeeds (24/24 static pages)

The default exports were verified unused across the codebase via ripgrep; the change is purely a lint compliance fix with no runtime behavior impact.

Closes the lint failure surfaced in #144.

Summary by CodeRabbit

  • Refactor
    • Improved internal module organization for API access and file-upload utilities.
    • Existing functionality and available operations remain unchanged.

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.
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Deen Bridge Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7ba5ebbd-7512-434b-a7fa-0ce05ab6cbd8

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between c76e032 and 292d802.

πŸ“’ Files selected for processing (2)
  • lib/actions/cached-api.js
  • lib/utils/cloudinaryUpload.js

Walkthrough

The change names the default-export objects in cached-api.js and cloudinaryUpload.js before exporting them. Their exported members remain unchanged.

Changes

Named module exports

Layer / File(s) Summary
Refactor default export objects
lib/actions/cached-api.js, lib/utils/cloudinaryUpload.js
The existing API bindings and Cloudinary utility functions are assigned to named constants and exported as the default values without changing their contents.

Estimated code review effort: 1 (Trivial) | ~2 minutes

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title clearly matches the PR’s main change: renaming anonymous default exports to named consts to satisfy linting.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

πŸ”§ ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Author

πŸ‘‹ Friendly ping for a maintainer.

This PR silences two `import/no-anonymous-default-export` warnings from `next/core-web-vitals` with a minimal, mechanical change (anonymous `export default { ... }` β†’ `const foo = { ... }; export default foo;`). Both default exports were verified unused across the repo before the change.

Local verification on the pushed commit:

  • `npm run lint` β†’ 0 warnings, 0 errors
  • `npm run build` β†’ success, 24/24 static pages

CI status note: the `Lint and Build` Actions run is sitting at `action_required` because this is a fork PR β€” a maintainer needs to click Approve and run before the workflow can access secrets. The Vercel preview check is similarly blocked on fork authorization.

Once approved, the lint-and-build job should go green on the first run since the local results already match the CI commands exactly.

@zeemscript

Copy link
Copy Markdown
Collaborator

@Whiznificent this PR has merge conflicts with the main branch. Please resolve the conflicts (merge main in or rebase) and push the fix so it can be merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants