Skip to content

chore(wrapper): resolve pre-existing Biome lint warnings#3776

Merged
rxri merged 1 commit intospicetify:mainfrom
tmchow:osc/fix-biome-lint-warnings
Apr 6, 2026
Merged

chore(wrapper): resolve pre-existing Biome lint warnings#3776
rxri merged 1 commit intospicetify:mainfrom
tmchow:osc/fix-biome-lint-warnings

Conversation

@tmchow
Copy link
Copy Markdown
Contributor

@tmchow tmchow commented Mar 31, 2026

Two pre-existing Biome lint warnings in jsHelper/spicetifyWrapper.js, discovered during #3773 review:

  1. Line 426: Number.parseInt(i) missing explicit radix parameter. Added , 10 for base-10 parsing.
  2. Line 2366: refreshCount destructured from useReducer but never read. Changed to [, refresh] to discard the unused value.

Both are mechanical fixes with no behavior change. The refresh function from the same destructuring is still used on line 2367.

This contribution was developed with AI assistance (Claude Code).

Summary by CodeRabbit

  • Bug Fixes

    • Improved version number parsing logic for enhanced compatibility handling with Spicetify versions.
  • Refactor

    • Removed unused variable binding to streamline code.

Add explicit radix parameter to Number.parseInt() call (line 426) and
remove unused refreshCount destructured variable (line 2366).

Both issues were pre-existing and flagged during PR spicetify#3773 review by
coderabbitai. Neither was introduced by that PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

📝 Walkthrough

Walkthrough

The changes refine version number parsing in a Cosmos proxy handler by adding an explicit base-10 radix to Number.parseInt(), and simplify a useReducer tuple assignment in _renderNavLinks by removing an unused binding for refreshCount.

Changes

Cohort / File(s) Summary
Version Parsing & Variable Cleanup
jsHelper/spicetifyWrapper.js
Modified Number.parseInt() call to include explicit radix parameter (base 10) for version component parsing; removed unused refreshCount variable from useReducer tuple assignment in _renderNavLinks.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A radix makes parsing so clear,
Ten's the base, no ambiguity here!
Unused bindings we swiftly discard,
Clean code hopping through the yard. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title claims to fix Biome lint warnings, and the PR does address two lint issues (missing radix parameter and unused variable), making it directly related to the main changes.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@rxri rxri changed the title fix: resolve pre-existing Biome lint warnings in spicetifyWrapper.js chore: resolve pre-existing Biome lint warnings in spicetifyWrapper.js Apr 6, 2026
@rxri rxri changed the title chore: resolve pre-existing Biome lint warnings in spicetifyWrapper.js chore(wrapper): resolve pre-existing Biome lint warnings Apr 6, 2026
@rxri rxri merged commit 2fc06fc into spicetify:main Apr 6, 2026
9 checks passed
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