Registry / testing / vite-plugin-oxlint

vite-plugin-oxlint

JSON →
library2.1.1jsnpmunverified

Vite plugin that integrates Oxlint, a fast Rust-based linter, into Vite build and dev workflows. Current stable version 2.1.1, release cadence is irregular with breaking changes in 2.0.0. Key differentiators: leverages Oxlint's performance (50-100x faster than ESLint), supports HMR linting (lintOnHotUpdate), and offers fine-grained control via options (failOnError, failOnWarning, deny/allow/warn rules). Active maintenance, peer dependencies require oxlint >=0.9.0 and Vite >=5.0.0.

npm install vite-plugin-oxlint
INSTALL
IMPORT
SIG · VITE-PLUGIN-OXLINT
V
vite-plugin-oxlint
testingjavascriptv2.1.1
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.

default
import oxlintPlugin from 'vite-plugin-oxlint'
const oxlintPlugin = require('vite-plugin-oxlint')
ESM-only package since v2.0.0; CommonJS require will fail
OxlintPluginOptions
import type { OxlintPluginOptions } from 'vite-plugin-oxlint'
import { OxlintPluginOptions } from 'vite-plugin-oxlint'
TypeScript type import only; not a runtime export
OxlintPluginUserConfig
import type { OxlintPluginUserConfig } from 'vite-plugin-oxlint'
Alternative exported type for user-facing options

Configures vite-plugin-oxlint to lint ./src on start and during HMR, ignoring tests, allowing no-unused-vars, denying no-console, warning on eqeqeq, and failing build on errors.

// vite.config.js import oxlintPlugin from 'vite-plugin-oxlint' export default { plugins: [ oxlintPlugin({ path: './src', failOnError: true, lintOnStart: true, lintOnHotUpdate: true, ignorePattern: 'tests/**', allow: ['no-unused-vars'], deny: ['no-console'], warn: ['eqeqeq'] }) ] }
Debug
Known issues
breakingv2.0.0 migrated from CommonJS to ESM-only. Require() will throw.
fix
Use import statements in your project (set type: module in package.json or use .mjs files).
affects: >=2.0.0
gotchaoxlint binary path must be absolute if specified, otherwise plugin may pick global install incorrectly.
fix
Set oxlintPath to an absolute path using path.resolve() or __dirname.
affects: >=1.6.0
gotchafailOnError and failOnWarning default to false; build succeeds even with lint errors unless explicitly set.
fix
Set failOnError: true and/or failOnWarning: true to enforce lint pass.
affects: >=1.0.0
gotchaThe 'params' option passes raw CLI flags; malformed or conflicting flags can cause silent failures or unexpected behavior.
fix
Avoid using params unless necessary; prefer built-in options like allow, deny, warn, format.
affects: >=1.0.0
deprecatedThe 'quiet' option suppresses warnings but may be deprecated in future in favor of 'failOnWarning: false' pattern.
fix
Use failOnWarning: false (default) to allow warnings without failing the build.
affects: >=1.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module /path/to/node_modules/vite-plugin-oxlint/dist/index.js from not supported.
Using CommonJS require() on an ESM-only package (v2.0.0+).
fix
Switch to import statement or use dynamic import().
Error: Cannot find module 'oxlint' (or 'vite-plugin-oxlint' is not a peer dependency)
Missing oxlint peer dependency; oxlint binary not installed or not found.
fix
Run npm install oxlint --save-dev (or yarn add oxlint --dev).
Error: Oxlint binary not found at path 'path/to/oxlint'. Check oxlintPath option.
The oxlintPath points to a non-existent or non-executable file.
fix
Ensure oxlintPath is an absolute path to the oxlint binary. Use which oxlint to locate global install.
Upgrade
Version history
2.1.1latest on npm
Audit
Dependencies
oxlintrequiredRuntime peer dependency: the plugin spawns the oxlint binary for linting
viterequiredHost peer dependency: plugin hooks into Vite's build and dev server
Agent activity
10 hits · last 30 days
node
10
Resources
vite-plugin-oxlint — npm install vite-plugin-oxlint · libregistry