Skip to content

fix(@vben/oxfmt-config): rename oxfmtConfig export to defaultOxfmtConfig#7699

Closed
lileyzhao wants to merge 1 commit intovbenjs:mainfrom
lileyzhao:main
Closed

fix(@vben/oxfmt-config): rename oxfmtConfig export to defaultOxfmtConfig#7699
lileyzhao wants to merge 1 commit intovbenjs:mainfrom
lileyzhao:main

Conversation

@lileyzhao
Copy link

@lileyzhao lileyzhao commented Mar 19, 2026

Description

This change renames the exported preset config in @vben/oxfmt-config from oxfmtConfig to defaultOxfmtConfig.

Previously, the package exported the OxfmtConfig type and the oxfmtConfig value, which differ only by case. That can cause compiler or auto-import issues in some tooling and makes the public API less clear.

Renaming the value export avoids the case-only collision and aligns the naming with the repository's existing default* config style.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Checklist

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs:dev command.
  • Run the tests with pnpm test.
  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • Refactor
    • Renamed configuration export to reflect default configuration naming conventions.

@changeset-bot
Copy link

changeset-bot bot commented Mar 19, 2026

⚠️ No Changeset found

Latest commit: 43ceb83

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
Contributor

coderabbitai bot commented Mar 19, 2026

📝 Walkthrough

Walkthrough

A single configuration file is updated to rename the exported default oxfmt configuration constant from oxfmtConfig to defaultOxfmtConfig. Internal references within the defineConfig function and the module exports are correspondingly updated to use the new name.

Changes

Cohort / File(s) Summary
Oxfmt Config Renaming
internal/lint-configs/oxfmt-config/src/index.ts
Renamed exported default configuration constant from oxfmtConfig to defaultOxfmtConfig; updated defineConfig function to spread the renamed constant; updated module exports accordingly.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • fix: oxlint config #7661: Imports and uses the oxfmt config object with defineConfig(), affected by the export renaming in this PR.

Suggested labels

bug

Suggested reviewers

  • anncwb
  • vince292007
  • wu-clan
  • mynetfan

Poem

🐰 A config renamed, neat and clean,
From old to new, a clearer scene,
Default takes a brighter name,
The oxfmt logic stays the same,
A little tweak to set things right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: renaming the oxfmtConfig export to defaultOxfmtConfig, which aligns with the core objective of the pull request.
Description check ✅ Passed The description includes all required template sections with appropriate detail: a clear explanation of changes, rationale, type of change selection, and relevant checklist items checked.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

Copy link
Contributor

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/lint-configs/oxfmt-config/src/index.ts`:
- Line 38: You removed the named export oxfmtConfig which is a breaking change
for consumers; restore a deprecated alias export so consumers still importing
oxfmtConfig work for one cycle: in the module that currently exports
defaultOxfmtConfig and defineConfig, add a named export oxfmtConfig that
references defaultOxfmtConfig (e.g., export const oxfmtConfig =
defaultOxfmtConfig) and mark it as deprecated in a comment/JS docstring; keep
defaultOxfmtConfig and defineConfig unchanged so both the new and old import
styles continue to function.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ba4d5882-a801-4f95-a66b-cbe2f278917c

📥 Commits

Reviewing files that changed from the base of the PR and between d43a372 and 43ceb83.

📒 Files selected for processing (1)
  • internal/lint-configs/oxfmt-config/src/index.ts

}

export { defineConfig, oxfmtConfig };
export { defaultOxfmtConfig, defineConfig };
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Removing oxfmtConfig export introduces a breaking API change.

Line 38 drops the previous named export. Any consumer importing oxfmtConfig will fail to compile after this release. Please keep a deprecated alias for one cycle if this PR is intended as a non-breaking fix.

Proposed backward-compatible export patch
 const defaultOxfmtConfig: OxfmtConfig = defineOxfmtConfig({
   ...
 });

+/** `@deprecated` Use `defaultOxfmtConfig` instead. */
+const oxfmtConfig = defaultOxfmtConfig;
+
 function defineConfig(config: OxfmtConfig = {}): OxfmtConfig {
   return defineOxfmtConfig({
     ...defaultOxfmtConfig,
     ...config,
   });
 }

-export { defaultOxfmtConfig, defineConfig };
+export { defaultOxfmtConfig, defineConfig, oxfmtConfig };
 export type { OxfmtConfig };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export { defaultOxfmtConfig, defineConfig };
/** `@deprecated` Use `defaultOxfmtConfig` instead. */
const oxfmtConfig = defaultOxfmtConfig;
function defineConfig(config: OxfmtConfig = {}): OxfmtConfig {
return defineOxfmtConfig({
...defaultOxfmtConfig,
...config,
});
}
export { defaultOxfmtConfig, defineConfig, oxfmtConfig };
export type { OxfmtConfig };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/lint-configs/oxfmt-config/src/index.ts` at line 38, You removed the
named export oxfmtConfig which is a breaking change for consumers; restore a
deprecated alias export so consumers still importing oxfmtConfig work for one
cycle: in the module that currently exports defaultOxfmtConfig and defineConfig,
add a named export oxfmtConfig that references defaultOxfmtConfig (e.g., export
const oxfmtConfig = defaultOxfmtConfig) and mark it as deprecated in a
comment/JS docstring; keep defaultOxfmtConfig and defineConfig unchanged so both
the new and old import styles continue to function.

@lileyzhao
Copy link
Author

Sorry for the noise. After adjusting some configuration settings in my IDE, it now correctly recognizes case sensitivity. This PR is no longer needed. Please close it. Thanks!

@jinmao88 jinmao88 closed this Mar 19, 2026
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