Registry / testing / eslint-plugin-oxfmt

eslint-plugin-oxfmt

JSON →
library0.4.0jsnpmunverified

An ESLint plugin that integrates oxfmt (a blazing-fast Rust-based formatter from the OXC project) as an ESLint rule. Current stable version is 0.4.0, released monthly. Requires ESLint v9+ with flat config (no legacy config support) and Node.js ^20.19.0 || >=22.12.0. Key differentiators: leverages oxfmt's performance (written in Rust), supports a wide range of formatting options including JSDoc, sort imports, Tailwind CSS class sorting, and EditorConfig integration. Unlike prettier-based ESLint plugins, it uses the same formatter as oxlint for unified formatting.

testingdevops
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ESM-only module. Require() will fail.

import pluginOxfmt from 'eslint-plugin-oxfmt'

The recommended config does not set `files`; you must specify it.

import pluginOxfmt from 'eslint-plugin-oxfmt'; export default [{ ...pluginOxfmt.configs.recommended, files: ['**/*.js'] }]

The rule name is 'oxfmt/oxfmt' (plugin prefix 'oxfmt', rule 'oxfmt').

rules: { 'oxfmt/oxfmt': 'error' }

Installs dependencies and sets up ESLint flat config to format files using oxfmt via the plugin's recommended config.

npm install -D oxfmt eslint-plugin-oxfmt // eslint.config.mjs import pluginOxfmt from 'eslint-plugin-oxfmt' export default [ { ...pluginOxfmt.configs.recommended, files: ['**/*.{js,ts,mjs,cjs,jsx,tsx}'], }, ] // Use ESLint fix: npx eslint --fix .
Debug
Known footguns
breakingVersion 0.1.0 dropped support for ESLint <9 and oxfmt <0.35.0.
breakingESLint flat config only. No support for .eslintrc or legacy config.
gotchaThe recommended config does not include the `files` property. If omitted, the rule will not be applied to any files.
gotchaEditorConfig support uses only a subset of options (indent_style, indent_size, tab_width, end_of_line, quote_type, max_line_length). Other EditorConfig properties are ignored.
deprecatedThe `jsdoc.commentLineStrategy` option changed from 'singleLine' to 'keep' in oxfmt 0.45.0? Check oxfmt docs.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources