Skip to content

feat: support oxfmt v0.49.0#18

Merged
ntnyq merged 4 commits into
mainfrom
feat/oxfmt
May 12, 2026
Merged

feat: support oxfmt v0.49.0#18
ntnyq merged 4 commits into
mainfrom
feat/oxfmt

Conversation

@ntnyq

@ntnyq ntnyq commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added Svelte formatting support with configurable options (allowShorthand, indent script/style, sort order) usable globally and per-override.
  • Documentation

    • Broadened config discovery to more format variants; updated ESLint examples with Svelte globs and Svelte option docs; clarified CLI ignore behavior to include parent .gitignore and .git/info/exclude.
  • Chores

    • Bumped toolchain/packages, added Svelte as an optional peer/dev dependency, and ignored pnpm store in .gitignore.
  • Tests

    • Added tests covering Svelte formatting behaviors.

Review Change Stack

Copilot AI review requested due to automatic review settings May 12, 2026 04:08
@pkg-pr-new

pkg-pr-new Bot commented May 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/ntnyq/eslint-plugin-oxfmt@18

commit: 5db4027

@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 992cadb9-e9b1-44d1-b692-eb95aa319e59

📥 Commits

Reviewing files that changed from the base of the PR and between cb2a9ca and 5db4027.

📒 Files selected for processing (1)
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

📝 Walkthrough

Walkthrough

Adds Svelte formatting support: new svelte option in schema/types and README, worker updated to call loadOxfmtConfig, dependency bumps, new Vitest Svelte tests, and a .gitignore entry for pnpm store.

Changes

Svelte Formatting Support Addition

Layer / File(s) Summary
Schema and Type Definitions
dts/rule-options.d.ts, src/schema.ts
Added optional svelte option (boolean or object with allowShorthand, indentScriptAndStyle, sortOrder) to top-level and overrides[].options; clarified overrides[].files resolution relative to useConfig.
Worker Config Loading Update
workers/oxfmt.mjs
Switched import/call from loadOxfmtConfigResult to loadOxfmtConfig and updated the formatViaOxfmt resolution step.
Dependency and Toolchain Updates
package.json
Bumped packageManager to pnpm@11.1.0, load-oxfmt-config to ^0.8.0, oxfmt to ^0.49.0 (peer >=0.49.0), updated @types/node, @typescript/native-preview, added svelte peer/dev deps, and bumped vitest.
Documentation and README Updates
README.md
Documented expanded oxfmt.config.* discovery variants, added svelte to ESLint example globs and advanced options, and noted parent .gitignore / .git/info/exclude behavior.
Svelte Formatting Tests
tests/files/svelte.test.ts, tests/files/svelte-options.test.ts
Added tests validating Svelte formatting and svelte option permutations with snapshots and inline snapshots.
Build Configuration Maintenance
.gitignore
Added pnpm store directory ignore pattern (**/.pnpm-store/**).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 A rabbit polishes code with care,

Svelte options bloom in tidy air,
Tests hum soft, docs now align,
Dependencies hop in line,
The formatter smiles — all set to share.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: support oxfmt v0.49.0' accurately reflects the primary change: upgrading oxfmt dependency from v0.48.0 to v0.49.0, including associated configuration updates and new svelte formatting support.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/oxfmt

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.

Copilot AI left a comment

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.

Pull request overview

This PR updates eslint-plugin-oxfmt to align with oxfmt v0.49.0 and the corresponding load-oxfmt-config API changes, and introduces .svelte formatting support (including new rule options + tests) to keep plugin behavior in parity with the formatter’s expanded language support.

Changes:

  • Update worker config loading to use loadOxfmtConfig (from load-oxfmt-config@0.8.0) and bump the plugin’s oxfmt compatibility floor to >=0.49.0.
  • Add svelte formatting option to the rule schema and generated rule option typings.
  • Add Svelte-focused test coverage (including option-specific tests) and document .svelte support in the README.

Reviewed changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
workers/oxfmt.mjs Switch config loading callsite to loadOxfmtConfig for load-oxfmt-config@0.8.0.
src/schema.ts Add svelte option schema; clarify override files resolution behavior in description.
README.md Document broader config discovery and add .svelte to example globs; expand ignore notes.
package.json Bump peer requirement to oxfmt >=0.49.0; update deps; add svelte devDependency for tests.
pnpm-lock.yaml Lockfile updates for oxfmt@0.49.0, load-oxfmt-config@0.8.0, and new transitive deps (incl. svelte).
dts/rule-options.d.ts Update generated rule option typings to include svelte.
tests/files/svelte.test.ts New baseline .svelte formatting test.
tests/files/svelte-options.test.ts New Svelte option tests (allowShorthand, indentScriptAndStyle, sortOrder).
tests/files/snapshots/svelte.test.ts.snap Snapshot for Svelte baseline test.
tests/files/snapshots/svelte-options.test.ts.snap Snapshots for Svelte options tests.
.gitignore Ignore pnpm store directories.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread README.md
Comment thread tests/files/svelte-options.test.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dts/rule-options.d.ts`:
- Around line 127-134: The change to the `svelte` option types in
dts/rule-options.d.ts must be produced by the generator, not hand-edited; please
revert any manual edits and regenerate this file by running the project
generator command (run `pnpm update:rule-options`) so the new `svelte` option
signature (the optional union with allowShorthand, indentScriptAndStyle,
sortOrder) is created automatically; ensure you regenerate the file so both
occurrences (the one around the `svelte` declaration and the other block at the
previously noted location) are updated consistently and commit the regenerated
output only.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 206f3285-5f96-4919-9063-ba28109faa0a

📥 Commits

Reviewing files that changed from the base of the PR and between 3937c8a and 6022f9e.

⛔ Files ignored due to path filters (3)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • tests/files/__snapshots__/svelte-options.test.ts.snap is excluded by !**/*.snap
  • tests/files/__snapshots__/svelte.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (8)
  • .gitignore
  • README.md
  • dts/rule-options.d.ts
  • package.json
  • src/schema.ts
  • tests/files/svelte-options.test.ts
  • tests/files/svelte.test.ts
  • workers/oxfmt.mjs

Comment thread dts/rule-options.d.ts

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread package.json Outdated
@ntnyq ntnyq merged commit 1e2119d into main May 12, 2026
12 checks passed
@ntnyq ntnyq deleted the feat/oxfmt branch May 18, 2026 02:50
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