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-oxlintVerified import paths — ran on the pinned version, not inferred.
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.
Use import statements in your project (set type: module in package.json or use .mjs files).
Set oxlintPath to an absolute path using path.resolve() or __dirname.
Set failOnError: true and/or failOnWarning: true to enforce lint pass.
Avoid using params unless necessary; prefer built-in options like allow, deny, warn, format.
Use failOnWarning: false (default) to allow warnings without failing the build.
Switch to import statement or use dynamic import().
Run npm install oxlint --save-dev (or yarn add oxlint --dev).
Ensure oxlintPath is an absolute path to the oxlint binary. Use which oxlint to locate global install.