{"id":19868,"library":"eslint-plugin-oxfmt","title":"eslint-plugin-oxfmt","description":"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.","status":"active","version":"0.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/ntnyq/eslint-plugin-oxfmt","tags":["javascript","eslint","eslint-plugin","oxc","oxfmt","oxlint","prettier","typescript"],"install":[{"cmd":"npm install eslint-plugin-oxfmt","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-oxfmt","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-oxfmt","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime peer dependency - oxfmt provides the actual formatting engine","package":"oxfmt","optional":false},{"reason":"Peer dependency - requires ESLint v9+ flat config","package":"eslint","optional":false}],"imports":[{"note":"ESM-only module. Require() will fail.","wrong":"const pluginOxfmt = require('eslint-plugin-oxfmt')","symbol":"eslint-plugin-oxfmt","correct":"import pluginOxfmt from 'eslint-plugin-oxfmt'"},{"note":"The recommended config does not set `files`; you must specify it.","wrong":"export default [{ ...pluginOxfmt.configs.recommended }] (omits files)","symbol":"pluginOxfmt.configs.recommended","correct":"import pluginOxfmt from 'eslint-plugin-oxfmt'; export default [{ ...pluginOxfmt.configs.recommended, files: ['**/*.js'] }]"},{"note":"The rule name is 'oxfmt/oxfmt' (plugin prefix 'oxfmt', rule 'oxfmt').","wrong":"rules: { 'oxfmt/format': 'error' }","symbol":"'oxfmt/oxfmt' rule","correct":"rules: { 'oxfmt/oxfmt': 'error' }"}],"quickstart":{"code":"npm install -D oxfmt eslint-plugin-oxfmt\n\n// eslint.config.mjs\nimport pluginOxfmt from 'eslint-plugin-oxfmt'\n\nexport default [\n  {\n    ...pluginOxfmt.configs.recommended,\n    files: ['**/*.{js,ts,mjs,cjs,jsx,tsx}'],\n  },\n]\n\n// Use ESLint fix: npx eslint --fix .","lang":"javascript","description":"Installs dependencies and sets up ESLint flat config to format files using oxfmt via the plugin's recommended config."},"warnings":[{"fix":"Upgrade to eslint-plugin-oxfmt@0.1.0+ and ensure oxfmt >=0.35.0 and ESLint >=9.0.0","message":"Version 0.1.0 dropped support for ESLint <9 and oxfmt <0.35.0.","severity":"breaking","affected_versions":"<0.1.0"},{"fix":"Migrate to ESLint flat config (eslint.config.mjs).","message":"ESLint flat config only. No support for .eslintrc or legacy config.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Always set `files: ['**/*.js', ...]` when spreading `pluginOxfmt.configs.recommended`.","message":"The recommended config does not include the `files` property. If omitted, the rule will not be applied to any files.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Check oxfmt documentation for supported properties.","message":"EditorConfig 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.","severity":"gotcha","affected_versions":">=0.2.0"},{"fix":"Refer to oxfmt changelog for accurate option names.","message":"The `jsdoc.commentLineStrategy` option changed from 'singleLine' to 'keep' in oxfmt 0.45.0? Check oxfmt docs.","severity":"deprecated","affected_versions":">=0.4.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install via `npm install eslint-plugin-oxfmt`. Use `import` syntax, not `require`.","cause":"Package not installed, or using require() on ESM-only package.","error":"Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'eslint-plugin-oxfmt'"},{"fix":"Use `'oxfmt/oxfmt': 'error'` or `'oxfmt/oxfmt': ['error', { /* options */ }]`.","cause":"Incorrect rule configuration format.","error":"Configuration for rule \"oxfmt/oxfmt\" is invalid: Value \"warn\" must be a string or array of strings."},{"fix":"Add `files: ['**/*.{js,ts,jsx,tsx}']` to the config object.","cause":"Using pluginOxfmt.configs.recommended without specifying `files`.","error":"ESLint: Key \"files\" is missing in config object."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}