feat: support oxfmt v0.49.0#18
Conversation
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds Svelte formatting support: new ChangesSvelte Formatting Support Addition
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
There was a problem hiding this comment.
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(fromload-oxfmt-config@0.8.0) and bump the plugin’soxfmtcompatibility floor to>=0.49.0. - Add
svelteformatting option to the rule schema and generated rule option typings. - Add Svelte-focused test coverage (including option-specific tests) and document
.sveltesupport 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.
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (3)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yamltests/files/__snapshots__/svelte-options.test.ts.snapis excluded by!**/*.snaptests/files/__snapshots__/svelte.test.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (8)
.gitignoreREADME.mddts/rule-options.d.tspackage.jsonsrc/schema.tstests/files/svelte-options.test.tstests/files/svelte.test.tsworkers/oxfmt.mjs
Summary by CodeRabbit
New Features
Documentation
Chores
Tests