feat: add plugin option configPath and useConfig#5
Conversation
|
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. Note Other AI code review bot(s) detectedCodeRabbit 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. 📝 WalkthroughWalkthroughMigrates 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ 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. Comment |
7069b34 to
2bce139
Compare
2bce139 to
7e503c5
Compare
There was a problem hiding this comment.
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
configPathoption to specify a custom path to an oxfmt configuration file - Adds
useConfigoption (defaults totrue) 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
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary by CodeRabbit
Release Notes
New Features
formatandformat:checknpm scripts for code formatting.useConfigandconfigPathfor enhanced configuration control.Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.