Skip to content

refactor: fix or suppress existing oxlint warnings#2634

Open
serhalp wants to merge 1 commit intomainfrom
serhalp/fix-existing-lint-warnings
Open

refactor: fix or suppress existing oxlint warnings#2634
serhalp wants to merge 1 commit intomainfrom
serhalp/fix-existing-lint-warnings

Conversation

@serhalp
Copy link
Copy Markdown
Member

@serhalp serhalp commented Apr 26, 2026

🔗 Linked issue

N/A

🧭 Context

There are 3 oxlint warnings on main.

📚 Description

Fix or suppress them.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Apr 26, 2026 10:28pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Apr 26, 2026 10:28pm
npmx-lunaria Ignored Ignored Apr 26, 2026 10:28pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: eecbe4ce-27f5-4461-85da-fdbc889484fc

📥 Commits

Reviewing files that changed from the base of the PR and between 69351cf and 454d459.

📒 Files selected for processing (3)
  • app/components/Package/TrendsChart.vue
  • app/composables/useSelectedPackageManager.ts
  • server/utils/readme.ts

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Internal code optimisations and improvements across multiple components, including linting adjustments and refactoring of validation logic. No changes to user-facing functionality.

Walkthrough

This pull request contains three minor changes across the codebase: adding a linter suppression comment to prevent warnings on a map call, refactoring a validation callback to use destructuring, and replacing a capturing group with a non-capturing group in a regular expression for consistency.

Changes

Cohort / File(s) Summary
Linter Configuration
app/components/Package/TrendsChart.vue
Adds oxlint suppression comment (oxlint-disable-next-line oxc-no-map-spread) above a map call within the normalisedDataset computed property to suppress linting warnings.
Validation Refactoring
app/composables/useSelectedPackageManager.ts
Refactors the Array.prototype.some predicate callback to destructure { id } directly instead of accessing pm.id on the parameter object.
Regex Optimisation
server/utils/readme.ts
Replaces a capturing group with a non-capturing group in the anchorTokenRegex pattern used for anchor heading detection, maintaining equivalent matching behaviour.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective of the PR—fixing or suppressing existing oxlint warnings—which aligns with the actual changeset across all three modified files.
Description check ✅ Passed The description is directly related to the changeset; it clearly states the context (3 oxlint warnings on main) and the objective (fix or suppress them), which matches the actual changes made.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch serhalp/fix-existing-lint-warnings

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.

const lastDateMs = chartData.value.dates.at(-1) ?? 0
const isAbsoluteMetric = selectedMetric.value === 'contributors'

// oxlint-disable-next-line oxc-no-map-spread
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe disable the rule in the config?

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@serhalp serhalp added the needs review This PR is waiting for a review from a maintainer label Apr 27, 2026
@serhalp serhalp requested a review from alexdln April 28, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review This PR is waiting for a review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants