Skip to content

refactor: remove unnecessary arrow functions#1773

Merged
graphieros merged 1 commit intonpmx-dev:mainfrom
btea:refactor/remove-wrap-function
Mar 1, 2026
Merged

refactor: remove unnecessary arrow functions#1773
graphieros merged 1 commit intonpmx-dev:mainfrom
btea:refactor/remove-wrap-function

Conversation

@btea
Copy link
Contributor

@btea btea commented Mar 1, 2026

🔗 Linked issue

/

🧭 Context

/

📚 Description

scrollToTop is a function in itself, so there's no need to nest it as an arrow function.

@vercel
Copy link

vercel bot commented Mar 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Mar 1, 2026 5:04am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Mar 1, 2026 5:04am
npmx-lunaria Ignored Ignored Mar 1, 2026 5:04am

Request Review

@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/components/ScrollToTop.client.vue 0.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f18d64e and 6316a30.

📒 Files selected for processing (2)
  • app/components/ScrollToTop.client.vue
  • app/pages/package/[[org]]/[name].vue

📝 Walkthrough

Walkthrough

This pull request refactors click event handlers in two Vue components related to scroll-to-top functionality. The changes simplify the implementation by converting inline arrow function wrappers to direct function references in the @click directives. Specifically, @click="() => scrollToTop()" is changed to @click="scrollToTop" in both ScrollToTop.client.vue and the package page component. No logic modifications, control flow changes, or error handling alterations are introduced.

Possibly related PRs

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining that scrollToTop is a function and does not need to be wrapped in an arrow function.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@graphieros graphieros added this pull request to the merge queue Mar 1, 2026
Merged via the queue into npmx-dev:main with commit 9485afa Mar 1, 2026
18 checks passed
@btea btea deleted the refactor/remove-wrap-function branch March 1, 2026 12:38
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