chore: migrate from biome to oxlint and oxfmt - #79
Conversation
- reformat code with oxfmt
🦋 Changeset detectedLatest commit: 61e2df8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughAdds OxLint/OxFmt tooling and VSCode settings, updates CI and package manager versions, consolidates package metadata across workspaces, applies widespread formatting, and wires a WebView controller into YoutubeView for player lifecycle/control integration. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
Deploying react-native-youtube-bridge-example with
|
| Latest commit: |
61e2df8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8169e239.react-native-youtube-bridge-example.pages.dev |
| Branch Preview URL: | https://chore-oxc.react-native-youtube-bridge-example.pages.dev |
Deploying react-native-youtube-bridge with
|
| Latest commit: |
1943944
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8bf846cf.react-native-youtube-bridge.pages.dev |
| Branch Preview URL: | https://chore-oxc.react-native-youtube-bridge.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
packages/react/src/hooks/useYoutubeVideoId.ts (1)
32-41:⚠️ Potential issue | 🟠 MajorAvoid derived expressions in dependency arrays.
The dependency array contains a complex derived expression instead of the raw
sourcevalue. This violates React best practices and suppresses theexhaustive-depsrule, which exists specifically to catch this anti-pattern.The current approach creates an unintended optimization: if the
sourceobject reference changes but the extracted value remains the same, the memo won't re-compute. For example, passing{ videoId: 'abc' }followed by a new object{ videoId: 'abc' }won't trigger recalculation. While this might be intentional, it deviates from standard React patterns and makes the code harder to maintain.Use
[source]directly in the dependency array and let React handle change detection normally.CONTRIBUTING.md (1)
107-107:⚠️ Potential issue | 🟡 MinorStale reference to ESLint in the Scripts section.
Line 107 still reads
lint files with ESLint, but the project has migrated to oxlint. This should be updated for consistency with the rest of the document.📝 Suggested fix
-- `bun run lint`: lint files with ESLint. +- `bun run lint`: lint files with oxlint.
🤖 Fix all issues with AI agents
In @.changeset/shiny-signs-agree.md:
- Around line 1-8: CI failed due to oxfmt formatting issues in the changeset
content that lists the packages ("react-native-youtube-bridge",
"@react-native-youtube-bridge/react", "@react-native-youtube-bridge/core",
"@react-native-youtube-bridge/web"); run oxfmt --write to reformat the changeset
file, review the updated .md to ensure the YAML header and the "chore: reformat
code with oxfmt" body remain correct, then stage and commit the formatted file
and push the commit to update the PR.
In @.oxlintrc.json:
- Line 7: Replace the "nursery": "error" setting in the oxlint configuration
with "nursery": "warn" to avoid CI breakage on oxlint upgrades; update the
"nursery" key in the .oxlintrc.json (the existing "nursery" entry) and, if
desired, promote individual nursery rules to "error" later after they stabilize
rather than keeping the global nursery bucket as an error.
In `@packages/react-native-youtube-bridge/docs/migration-v2.md`:
- Around line 163-165: The code sample shows invalid TypeScript generic spacing
in the playerRef declaration; update the useRef usage for the symbol playerRef
so the generic is written without spaces and includes the nullable type and
initial null value (i.e., use a proper TypeScript generic like
useRef<PlayerControls | null>(null)), ensuring you reference the PlayerControls
type and keep useRef import intact.
In `@packages/react-native-youtube-bridge/src/utils/youtube.ts`:
- Around line 23-28: The code currently skips adding startTime/endTime when they
are 0 because it uses truthy checks; change the conditional in the function that
builds the URL to explicitly check for null/undefined (e.g., replace "if
(startTime)" and "if (endTime)" with checks like "if (startTime !== null &&
startTime !== undefined)") so url.searchParams.set('startTime',
startTime.toString()) and url.searchParams.set('endTime', endTime.toString())
run for 0 values; ensure you reference the same startTime/endTime variables and
the url.searchParams.set calls when making the change.
In `@web/package.json`:
- Line 22: The web package's packageManager field currently uses "bun@1.3.9"
while the root package.json uses "pnpm@10.29.3"; decide on the monorepo-wide
package manager and make them consistent — if the monorepo should use pnpm,
change the "packageManager" value in the web package from "bun@1.3.9" to
"pnpm@10.29.3" (or vice versa update the root package.json to "bun@1.3.9" if bun
is intended); ensure the single canonical value is applied to the
"packageManager" field in both the root package.json and the web package's
package.json.
| "vite": "^6.3.5" | ||
| } | ||
| }, | ||
| "packageManager": "bun@1.3.9" |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
bun 1.3.9 release notes
💡 Result:
Bun v1.3.9 (published February 8, 2026) release notes highlights: [1][2]
bun run --parallel/--sequential: run multiplepackage.jsonscripts concurrently or in order, with prefixed output; supports workspaces /--filterplus flags like--no-exit-on-errorand--if-present. [1]- HTTP/2 fix:
net.Server → Http2SecureServerconnection-upgrade pattern now works (used by tools likehttp2-wrapper). [1] - bun:test:
mock()andspyOn()now implementSymbol.dispose, enablingusingfor automatic cleanup/restore. [1] - Proxy behavior:
NO_PROXYis now respected even when a proxy is passed explicitly tofetch()/WebSocket. [1] - Profiling: adds
--cpu-prof-interval(microsecond sampling interval), matching Node’s flag. [1] - Compilation: ESM bytecode is now supported in
bun --compilewhen using--bytecode --format=esm. [1] - ARM64 stability: fixes SIGILL crashes on older ARMv8.0 CPUs (e.g., Raspberry Pi 4, AWS a1) by avoiding ARMv8.1-only atomics. [1]
- Markdown perf: faster Markdown-to-HTML (SIMD scanning) and faster
Bun.markdown.react()via tag-string caching. [1] - Runtime/JSC upgrade: performance work including SIMD-accelerated RegExp prefix search, RegExp JIT improvements for fixed-count groups, and JIT/intrinsic optimizations for
startsWith,Map/Set.size, andtrim. [1]
Sources: Bun blog release notes [1] and the GitHub release entry linking to them [2].
[1] (bun.sh)
[2] (github.com)
Citations:
🏁 Script executed:
# Find all package.json files in the repository
find . -name "package.json" -type f | head -20Repository: react-native-bridges/react-native-youtube-bridge
Length of output: 287
🏁 Script executed:
# Search for packageManager field across all package.json files
rg '"packageManager"' --type jsonRepository: react-native-bridges/react-native-youtube-bridge
Length of output: 188
Address packageManager inconsistency across the monorepo.
bun@1.3.9 is a valid release (released February 8, 2026), but the monorepo uses inconsistent package managers: the root package.json specifies pnpm@10.29.3 while web/package.json specifies bun@1.3.9. Ensure this difference is intentional; if the entire monorepo should use the same package manager, align all packageManager fields.
🤖 Prompt for AI Agents
In `@web/package.json` at line 22, The web package's packageManager field
currently uses "bun@1.3.9" while the root package.json uses "pnpm@10.29.3";
decide on the monorepo-wide package manager and make them consistent — if the
monorepo should use pnpm, change the "packageManager" value in the web package
from "bun@1.3.9" to "pnpm@10.29.3" (or vice versa update the root package.json
to "bun@1.3.9" if bun is intended); ensure the single canonical value is applied
to the "packageManager" field in both the root package.json and the web
package's package.json.
Summary by CodeRabbit
Chores
Documentation
Style
Examples