Skip to content

feat: bundle .oxlintrc.json (experimental)#77

Draft
pi0 wants to merge 4 commits intomainfrom
build/oxc-config
Draft

feat: bundle .oxlintrc.json (experimental)#77
pi0 wants to merge 4 commits intomainfrom
build/oxc-config

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Jan 23, 2026

This PR exports an (auto) migrated version (using oxlint-migrate) of the default unjs preset to the package to reuse across projects (we use this preset in most of unjs repos, h3 and nitro).

Notes:

  • Not sure yet, even if we can extend oxlint config, have to try, or do a ln -s node_modules/eslint-config-unjs/.oxlintrc.json .
  • Globals and $schema removed to reduce size (also not sure)
  • Had to patch jiti usage in oxlint-migrate, consistent with Node.js ESM, defaults should be interoperable otherwise even imports from eslint package are broken (we extend config from src/index.ts`
  • Final JSON is pre-formatted via oxfmt! (as JSON.stringify is not compliant with prettier/oxfmt, even linking to project root triggers fromatter)

/cc @Boshen

@connorshea
Copy link

FWIW oxc-project/oxlint-migrate#357 may fix the problem you have that requires the jiti patch, once it's merged and released

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