# load-oxfmt-config

> Load and resolve oxfmt configuration files, including explicit JS/TS config paths, and merge supported `.editorconfig` settings for Oxfmt.

Latest version **0.26.0** (published 2026-09-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install load-oxfmt-config
pnpm add load-oxfmt-config
yarn add load-oxfmt-config
bun add load-oxfmt-config
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.26.0 |
| Published | 2026-09-29 |
| First published | 2025-12-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^22.13.0 \|\| >=24 |
| Dependencies | 6 |
| Unpacked size | 71.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | ntnyq |
| Maintainers | ntnyq |
| Keywords | editorconfig, jsonc-parser, load-config, load-oxfmt-config, load-oxfmtrc, oxfmt, oxfmtrc |

## Links

- npm: https://www.npmjs.com/package/load-oxfmt-config
- Repository: https://github.com/ntnyq/eslint-plugin-oxfmt
- Homepage: https://github.com/ntnyq/eslint-plugin-oxfmt/tree/main/packages/load-oxfmt-config#readme
- Issues: https://github.com/ntnyq/eslint-plugin-oxfmt/issues
- npm.io page: https://npm.io/package/load-oxfmt-config

## Dependencies (6)

- [jiti](https://npm.io/package/jiti.md) ^2.7.0
- [ignore](https://npm.io/package/ignore.md) ^7.0.10
- [minimatch](https://npm.io/package/minimatch.md) ~10.2.6
- [@ntnyq/utils](https://npm.io/package/@ntnyq/utils.md) ^0.23.0
- [editorconfig](https://npm.io/package/editorconfig.md) ^3.0.2
- [jsonc-parser](https://npm.io/package/jsonc-parser.md) ^3.3.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.26.0 (latest) — 2026-09-29
- 0.25.0 — 2026-09-22
- 0.24.0 — 2026-09-16
- 0.23.0 — 2026-09-08
- 0.22.0 — 2026-09-02
- 0.21.0 — 2026-08-25
- 0.20.0 — 2026-08-19
- 0.19.0 — 2026-08-11
- 0.18.0 — 2026-08-04
- 0.17.0 — 2026-07-31
- 0.16.0 — 2026-07-22
- 0.15.0 — 2026-07-16
- 0.14.0 — 2026-07-07
- 0.13.0 — 2026-06-30
- 0.12.1 — 2026-06-22
- … 27 more at https://npm.io/package/load-oxfmt-config/versions

## README

# eslint-plugin-oxfmt

[![CI](https://github.com/ntnyq/eslint-plugin-oxfmt/actions/workflows/ci.yml/badge.svg)](https://github.com/ntnyq/eslint-plugin-oxfmt/actions/workflows/ci.yml)

Format code with [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) through ESLint, or load oxfmt configuration in your own tools.

## Packages

| Package                                                                  | Purpose                                                                | Documentation                                             |
| ------------------------------------------------------------------------ | ---------------------------------------------------------------------- | --------------------------------------------------------- |
| [eslint-plugin-oxfmt](https://www.npmjs.com/package/eslint-plugin-oxfmt) | ESLint flat-config plugin with formatting fixes and CLI parity presets | [Plugin README](./packages/eslint-plugin-oxfmt/README.md) |
| [load-oxfmt-config](https://www.npmjs.com/package/load-oxfmt-config)     | Config discovery, EditorConfig merging, caching, and ignore resolution | [Loader README](./packages/load-oxfmt-config/README.md)   |

## Quick Start

Both packages require Node.js `^22.13.0 || >=24` and oxfmt `>=0.71.0`.

### ESLint Plugin

Requires ESLint `^9.5.0 || ^10.0.0` with flat config.

```shell
pnpm add -D eslint oxfmt eslint-plugin-oxfmt
```

```js
// eslint.config.mjs
import pluginOxfmt from 'eslint-plugin-oxfmt'

export default [
  {
    ...pluginOxfmt.configs.recommended,
    files: ['**/*.{js,ts,mjs,cjs,jsx,tsx}'],
  },
]
```

`recommended` includes a plain-text parser. See the [plugin documentation](./packages/eslint-plugin-oxfmt/README.md) for parser-preserving composition, additional languages, and CLI parity behavior.

### Config Loader

```shell
pnpm add oxfmt load-oxfmt-config
```

```ts
import { loadOxfmtConfig } from 'load-oxfmt-config'

const result = await loadOxfmtConfig()
console.log(result.config)
```

See the [loader documentation](./packages/load-oxfmt-config/README.md) for config discovery, EditorConfig support, caching, and ignore resolution.

## Development

Run commands from the repository root using the pnpm version pinned in `package.json`.

```shell
pnpm install --frozen-lockfile
pnpm build
pnpm test
```

| Command                             | Purpose                                                                     |
| ----------------------------------- | --------------------------------------------------------------------------- |
| `pnpm build`                        | Build both packages and regenerate plugin rule types                        |
| `pnpm dev`                          | Build once, then watch both packages                                        |
| `pnpm test`                         | Run both packages' tests; build first                                       |
| `pnpm check:schema`                 | Compare the plugin schema with the installed oxfmt schema                   |
| `pnpm update:rule-options`          | Regenerate the plugin's rule option declarations                            |
| `pnpm format` / `pnpm format:check` | Format or check repository files without loading nested fixture configs     |
| `pnpm lint` / `pnpm typecheck`      | Run repository lint and TypeScript checks                                   |
| `pnpm check:package`                | Inspect publishable package contents without creating tarballs; build first |
| `pnpm release:check`                | Run all checks, including builds, tests, and package validation             |

Run a single suite after building:

```shell
pnpm --filter eslint-plugin-oxfmt test tests/cli-parity.test.ts
pnpm --filter load-oxfmt-config test tests/load-config.test.ts
```

Run `pnpm release:check` before submitting changes. This also verifies loader changes against the plugin.

Branch pushes and pull requests publish preview packages through [pkg.pr.new](./.github/workflows/pkg-pr-new.yml).

## Releases

See [GitHub Releases](https://github.com/ntnyq/eslint-plugin-oxfmt/releases) for release notes. Both packages share one version and one `v<version>` Git tag.

Maintainers can publish from a clean, up-to-date `main` checkout:

```shell
pnpm release
```

The command runs all checks, prompts for a version, then commits, tags, and pushes. The [release workflow](./.github/workflows/release.yml) publishes both packages to npm and creates a GitHub Release. Stable versions use `latest`; prereleases use `next`.

Both npm packages must authorize `ntnyq/eslint-plugin-oxfmt` and workflow `release.yml` as a Trusted Publisher, with direct publishing allowed and no GitHub environment configured.

## Related Projects

- [oxc](https://github.com/oxc-project/oxc) - The Oxidation Compiler
- [oxlint](https://github.com/oxc-project/oxc) - A fast linter
- [ESLint](https://eslint.org/) - Pluggable JavaScript linter

## License

[MIT](./LICENSE) License © 2025-PRESENT [ntnyq](https://github.com/ntnyq)

---
_Source: https://npm.io/package/load-oxfmt-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
