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.

npm install eslint-plugin-oxfmt
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-OXFM
E
eslint-plugin-oxfmt
testingjavascriptv0.4.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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.

eslint-plugin-oxfmt
import pluginOxfmt from 'eslint-plugin-oxfmt'
const pluginOxfmt = require('eslint-plugin-oxfmt')
ESM-only module. Require() will fail.
pluginOxfmt.configs.recommended
import pluginOxfmt from 'eslint-plugin-oxfmt'; export default [{ ...pluginOxfmt.configs.recommended, files: ['**/*.js'] }]
export default [{ ...pluginOxfmt.configs.recommended }] (omits files)
The recommended config does not set `files`; you must specify it.
'oxfmt/oxfmt' rule
rules: { 'oxfmt/oxfmt': 'error' }
rules: { 'oxfmt/format': 'error' }
The rule name is 'oxfmt/oxfmt' (plugin prefix 'oxfmt', rule 'oxfmt').

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 issues
breakingVersion 0.1.0 dropped support for ESLint <9 and oxfmt <0.35.0.
fix
Upgrade to eslint-plugin-oxfmt@0.1.0+ and ensure oxfmt >=0.35.0 and ESLint >=9.0.0
affects: <0.1.0
breakingESLint flat config only. No support for .eslintrc or legacy config.
fix
Migrate to ESLint flat config (eslint.config.mjs).
affects: >=0.1.0
gotchaThe recommended config does not include the `files` property. If omitted, the rule will not be applied to any files.
fix
Always set `files: ['**/*.js', ...]` when spreading `pluginOxfmt.configs.recommended`.
affects: >=0.0.1
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.
fix
Check oxfmt documentation for supported properties.
affects: >=0.2.0
deprecatedThe `jsdoc.commentLineStrategy` option changed from 'singleLine' to 'keep' in oxfmt 0.45.0? Check oxfmt docs.
fix
Refer to oxfmt changelog for accurate option names.
affects: >=0.4.0
Errors
Common errors & fixes
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'eslint-plugin-oxfmt'
Package not installed, or using require() on ESM-only package.
fix
Install via `npm install eslint-plugin-oxfmt`. Use `import` syntax, not `require`.
Configuration for rule "oxfmt/oxfmt" is invalid: Value "warn" must be a string or array of strings.
Incorrect rule configuration format.
fix
Use `'oxfmt/oxfmt': 'error'` or `'oxfmt/oxfmt': ['error', { /* options */ }]`.
ESLint: Key "files" is missing in config object.
Using pluginOxfmt.configs.recommended without specifying `files`.
fix
Add `files: ['**/*.{js,ts,jsx,tsx}']` to the config object.
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies
oxfmtrequiredRuntime peer dependency - oxfmt provides the actual formatting engine
eslintrequiredPeer dependency - requires ESLint v9+ flat config
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-oxfmt — npm install eslint-plugin-oxfmt · libregistry