Skip to content

setup and run oxfmt#81

Merged
agneym merged 5 commits intomasterfrom
80-setup-oxfmt
Dec 20, 2025
Merged

setup and run oxfmt#81
agneym merged 5 commits intomasterfrom
80-setup-oxfmt

Conversation

@agneym
Copy link
Owner

@agneym agneym commented Dec 20, 2025

Closes #80

Summary by CodeRabbit

  • Chores

    • Updated project configuration and dependencies, including adding development tooling.
    • Reorganized package metadata fields across configuration files.
    • Adjusted code formatting standards for consistency.
  • Bug Fixes

    • Enhanced theme mode reactivity in the theme provider to ensure updates trigger correctly when mode changes.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Dec 20, 2025

⚠️ No Changeset found

Latest commit: 5140d43

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

Warning

Rate limit exceeded

@agneym has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 30 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 745ded0 and 5140d43.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (22)
  • .changeset/config.json (1 hunks)
  • .github/workflows/nodejs.yml (1 hunks)
  • .husky/.gitignore (0 hunks)
  • .husky/pre-commit (0 hunks)
  • example/src/index.html (1 hunks)
  • lefthook.yml (1 hunks)
  • package.json (1 hunks)
  • playground/.babelrc (1 hunks)
  • playground/scripts/test-utils.tsx (1 hunks)
  • playground/src/Draggable/useDrag.ts (1 hunks)
  • playground/src/Editor/EditorSetup.tsx (1 hunks)
  • playground/src/Editor/index.tsx (1 hunks)
  • playground/src/Result/Frame.tsx (1 hunks)
  • playground/src/Result/index.tsx (2 hunks)
  • playground/src/TabStyles.tsx (1 hunks)
  • playground/src/__tests__/Editor.test.tsx (2 hunks)
  • playground/src/__tests__/Frame.test.tsx (1 hunks)
  • playground/src/utils/ThemeProvider.tsx (1 hunks)
  • playground/src/utils/constructSnippet.ts (2 hunks)
  • playground/src/utils/media.ts (2 hunks)
  • playground/tsconfig.json (1 hunks)
  • pnpm-workspace.yaml (1 hunks)

Walkthrough

The changes revert Prettier's trailingComma configuration to defaults, reorganize package metadata across multiple package.json files, add oxfmt as a devDependency, and apply minor formatting adjustments to TypeScript files including arrow function parentheses and quote styles.

Changes

Cohort / File(s) Change Summary
Configuration
.prettierrc
Removed explicit trailingComma: "es5" configuration entry, reverting to Prettier's default behavior.
Package Metadata
example/package.json, package.json
Reorganized and added metadata fields (keywords, license, author, repository, bugs); added oxfmt devDependency in root; downgraded packageManager version.
Playground Package
playground/package.json
Added comprehensive public metadata (keywords, bugs, license, author, repository, files, types, peerDependencies); reintroduced publishConfig and scripts sections; removed description field.
Source Code Formatting
playground/src/TabStyles.tsx, playground/src/utils/ThemeProvider.tsx, playground/src/utils/media.ts
Applied formatting adjustments: arrow function parentheses in template literals, quote style normalization to double quotes, added useEffect dependency array [mode], and trailing newline.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • playground/src/utils/ThemeProvider.tsx — Verify that the added [mode] dependency array to useEffect correctly captures the intended re-computation trigger.
  • package.json packageManager downgrade — Confirm the version change from dev to lower PNPM version is intentional and compatible with project requirements.
  • playground/package.json peerDependencies — Validate React version constraints are appropriate for downstream consumers.

Possibly related issues

  • Issue #80 — Directly addresses oxfmt devDependency addition and Prettier configuration adjustments mentioned in the formatter setup scope.

Possibly related PRs

  • PR #79 — Modifies root package.json's packageManager field in relation to this PR's version adjustment.

Poem

🐰 With prettier rules now set to default,
And metadata fields all rearranged with salt,
Oxfmt joins the tooling band,
While arrow functions look freshly grand—
A formatter's feast, both tight and planned! 🎨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'setup and run oxfmt' accurately describes the main changes in the pull request, which include adding oxfmt as a devDependency and reformatting code using oxfmt standards.

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
playground/package.json (1)

21-24: Consider including LICENSE file if it exists.

The files array currently includes only dist and README.md. If a LICENSE file exists in the repository, consider adding it to ensure proper license distribution with the published package.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9a21a36 and 745ded0.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • .prettierrc (0 hunks)
  • example/package.json (1 hunks)
  • package.json (2 hunks)
  • playground/package.json (3 hunks)
  • playground/src/TabStyles.tsx (1 hunks)
  • playground/src/utils/ThemeProvider.tsx (2 hunks)
  • playground/src/utils/media.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • .prettierrc
🧰 Additional context used
🧬 Code graph analysis (1)
playground/src/utils/ThemeProvider.tsx (1)
playground/src/utils/theme.ts (1)
  • theme (63-102)
🔇 Additional comments (8)
playground/src/utils/media.ts (1)

11-11: LGTM!

Trailing newline addition is a standard formatting convention. No functional changes.

playground/src/TabStyles.tsx (1)

10-41: LGTM!

Consistent formatting update to arrow function parameters across all styled components. The parentheses around single parameters (props) => align with the new formatter configuration.

playground/src/utils/ThemeProvider.tsx (1)

1-22: LGTM!

Formatting adjustments (double quotes for imports, line break adjustments) applied consistently. No functional changes to the ThemeProvider component.

package.json (2)

5-8: LGTM!

Repository metadata addition improves package discoverability and aligns with npm best practices.


28-28: Note: packageManager version updated.

The packageManager field has been updated to pnpm@10.26.1. Ensure this version is compatible with the CI/CD environment and team members' local setups.

example/package.json (1)

6-8: LGTM!

Metadata fields repositioned to follow conventional package.json ordering. No functional changes.

playground/package.json (2)

5-19: LGTM! Well-structured package metadata.

The addition of standard npm metadata fields (description, keywords, bugs, license, author, repository) properly configures the package for publishing and improves discoverability.


38-46: LGTM! Standard publishing configuration and scripts.

The publishConfig and scripts blocks are properly configured for package publishing and development workflow.

Comment on lines +75 to +78
"peerDependencies": {
"react": ">=16",
"react-dom": ">=16"
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -path "*/playground/package.json" -type f | head -5

Repository: agneym/playground

Length of output: 86


🏁 Script executed:

cat -n playground/package.json

Repository: agneym/playground

Length of output: 2854


🏁 Script executed:

find playground/src -type f \( -name "*.tsx" -o -name "*.ts" -o -name "*.jsx" -o -name "*.js" \) | head -10

Repository: agneym/playground

Length of output: 409


🏁 Script executed:

# Check main component and Frame for deprecated APIs
head -50 playground/src/Playground.tsx
echo "---"
head -80 playground/src/Result/Frame.tsx
echo "---"
# Search for ReactDOM usage patterns
rg -n "ReactDOM\.(render|hydrate|unmountComponentAtNode|createPortal|createRoot)" playground/src

Repository: agneym/playground

Length of output: 2966


🏁 Script executed:

# Check what version of @reach packages support
rg -n "@reach/(auto-id|tabs)" playground/src
echo "---"
# Look for any React-specific version checks or conditional rendering
rg -n "React\.version|hook|__REACT" playground/src || echo "No version-specific code found"

Repository: agneym/playground

Length of output: 269


🏁 Script executed:

# Check the dependencies used and their React compatibility
cat playground/package.json | grep -A 10 "dependencies"
echo "---"
# Look for any actual usage that might break in React 18
rg -n "useEffect|useCallback|useMemo" playground/src | head -20

Repository: agneym/playground

Length of output: 1663


🏁 Script executed:

# Check @reach package versions and their React compatibility notes
# Let's also verify no deprecated ReactDOM patterns
rg -n "ReactDOM\.|react-dom" playground/src --type tsx --type ts

Repository: agneym/playground

Length of output: 88


🏁 Script executed:

# Check for ReactDOM usage
rg -n "ReactDOM" playground/src
echo "---"
# Check the devDependencies and actual React version used
grep -E "react|@reach|goober|prism-react" playground/package.json

Repository: agneym/playground

Length of output: 566


Narrow peerDependencies to match actual dependency support.

The peerDependencies range of >=16 is too broad and misleading. The package's dependencies—specifically @reach/auto-id and @reach/tabs at 0.16.x, which declare peerDependencies for React "^16.8.0 || 17.x"—do not support React 18+. Change the peerDependencies to:

"peerDependencies": {
  "react": "^16.8.0 || ^17.0.0",
  "react-dom": "^16.8.0 || ^17.0.0"
}

This accurately reflects the versions your dependencies actually support and prevents npm warnings when users attempt to install with React 18.

🤖 Prompt for AI Agents
In playground/package.json around lines 75 to 78, the peerDependencies use an
overly-broad ">=16" range for react and react-dom; narrow them to the actual
supported ranges by changing the entries to "react": "^16.8.0 || ^17.0.0" and
"react-dom": "^16.8.0 || ^17.0.0" so they match the transitive dependencies
(e.g. @reach/* at 0.16.x) and avoid npm warnings for React 18.

@agneym agneym merged commit a74287c into master Dec 20, 2025
2 checks passed
@agneym agneym deleted the 80-setup-oxfmt branch December 20, 2025 06:49
@coderabbitai coderabbitai bot mentioned this pull request Dec 20, 2025
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.

Setup oxfmt

1 participant