Skip to content

feat: add plugin option configPath and useConfig#5

Merged
ntnyq merged 3 commits into
mainfrom
feat/plugin-options
Jan 22, 2026
Merged

feat: add plugin option configPath and useConfig#5
ntnyq merged 3 commits into
mainfrom
feat/plugin-options

Conversation

@ntnyq

@ntnyq ntnyq commented Jan 22, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

  • New Features

    • Added format and format:check npm scripts for code formatting.
    • New plugin options: useConfig and configPath for enhanced configuration control.
  • Chores

    • Migrated from Prettier to oxfmt as the primary code formatter.
    • Added build phase to CI and autofix workflows.
    • Updated dependencies and ESLint configuration.
  • Documentation

    • Updated with plugin options documentation and usage examples.

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

Copilot AI review requested due to automatic review settings January 22, 2026 03:26
@coderabbitai

coderabbitai Bot commented Jan 22, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@ntnyq has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 43 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.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Migrates project from Prettier to oxfmt formatter. Adds oxfmt configuration file, integrates oxfmt ESLint plugin, updates CI workflows with build steps, switches VSCode settings to oxc formatter, removes Prettier dependencies, adds format scripts, and updates documentation and tests accordingly.

Changes

Cohort / File(s) Summary
CI/Build Workflows
.github/workflows/autofix.yml, .github/workflows/ci.yml
Added pnpm run build step before linting in both workflows to ensure code is compiled before formatting and type checks.
Formatter Configuration & Migration
.oxfmtrc.json, .prettierignore, prettier.config.mjs
Introduced oxfmt config with formatting rules and file exclusions; removed test fixtures from prettier ignore list; deleted entire Prettier config file.
Editor & ESLint Setup
.vscode/settings.json, eslint.config.mjs
Switched default formatter from Prettier to oxc/oxfmt; restructured ESLint config to use two-argument defineESLintConfig form and integrated oxfmt plugin with explicit rule configuration.
Package & Dependencies
package.json
Added format and format:check scripts; bumped @ntnyq/eslint-config to beta version; removed prettier; added eslint-plugin-oxfmt; updated nano-staged config to use unified ESLint glob pattern.
Rule Configuration & Types
dts/rule-options.d.ts, src/rules/oxfmt.ts
Added configPath (string) and useConfig (boolean) options to rule schema and type declarations for controlling oxfmt configuration loading.
Documentation & Tests
README.md, tests/rules/oxfmt.test.ts, tests/index.test.ts
Updated docs with new plugin options and shell code fence formatting; added useConfig: false to all test cases; removed placeholder unit test.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Our formatter hops to a new delight,
Oxfmt now polishes code oh so bright!
No Prettier needed, we've made the big switch,
Build, lint, and format—a perfectly clean pitch! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding two new plugin options (configPath and useConfig) to the eslint-plugin-oxfmt. This is reflected across multiple files including rule definitions, TypeScript declarations, configuration, and tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


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.

@ntnyq ntnyq force-pushed the feat/plugin-options branch from 2bce139 to 7e503c5 Compare January 22, 2026 03:29

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 adds two new plugin configuration options (configPath and useConfig) to the eslint-plugin-oxfmt, allowing users to control how the plugin loads oxfmt configuration files. Additionally, it migrates the project itself from Prettier to oxfmt for formatting.

Changes:

  • Adds configPath option to specify a custom path to an oxfmt configuration file
  • Adds useConfig option (defaults to true) to control whether config files are loaded
  • Migrates project tooling from Prettier to oxfmt (removes Prettier dependency and config, adds .oxfmtrc.json)

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/rules/oxfmt.ts Adds schema definitions for configPath and useConfig options in the ESLint rule
dts/rule-options.d.ts Updates TypeScript type definitions with new plugin options
tests/rules/oxfmt.test.ts Adds useConfig: false to all test cases to prevent config file loading during tests
tests/snapshots/eslint-plugin.test.ts.snap Updates snapshots to reflect formatting changes from using oxfmt config
tests/index.test.ts Removes dummy test file (no longer needed)
.oxfmtrc.json Adds oxfmt configuration for the project itself
eslint.config.mjs Configures ESLint to use oxfmt plugin instead of Prettier
package.json Updates dependencies (removes Prettier, adds oxfmt scripts), updates to beta version of @ntnyq/eslint-config
pnpm-lock.yaml Updates lockfile with new dependency tree
README.md Documents the new plugin options and updates code block syntax to shell
.vscode/settings.json Changes default formatter from Prettier to oxc-vscode
prettier.config.mjs Removes Prettier configuration (deleted)
.prettierignore Removes Prettier ignore file (deleted)
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread src/rules/oxfmt.ts Outdated
Comment thread src/rules/oxfmt.ts Outdated
Comment thread README.md Outdated
ntnyq and others added 2 commits January 22, 2026 11:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ntnyq ntnyq merged commit 25ed2fc into main Jan 22, 2026
12 checks passed
@ntnyq ntnyq deleted the feat/plugin-options branch January 22, 2026 04:00
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