{"id":20677,"library":"vite-plugin-oxlint","title":"vite-plugin-oxlint","description":"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.","status":"active","version":"2.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/52-entertainment/vite-plugin-oxlint","tags":["javascript","oxlint","vite","vite-plugin","typescript"],"install":[{"cmd":"npm install vite-plugin-oxlint","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-oxlint","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-oxlint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime peer dependency: the plugin spawns the oxlint binary for linting","package":"oxlint","optional":false},{"reason":"Host peer dependency: plugin hooks into Vite's build and dev server","package":"vite","optional":false}],"imports":[{"note":"ESM-only package since v2.0.0; CommonJS require will fail","wrong":"const oxlintPlugin = require('vite-plugin-oxlint')","symbol":"default","correct":"import oxlintPlugin from 'vite-plugin-oxlint'"},{"note":"TypeScript type import only; not a runtime export","wrong":"import { OxlintPluginOptions } from 'vite-plugin-oxlint'","symbol":"OxlintPluginOptions","correct":"import type { OxlintPluginOptions } from 'vite-plugin-oxlint'"},{"note":"Alternative exported type for user-facing options","wrong":"","symbol":"OxlintPluginUserConfig","correct":"import type { OxlintPluginUserConfig } from 'vite-plugin-oxlint'"}],"quickstart":{"code":"// vite.config.js\nimport oxlintPlugin from 'vite-plugin-oxlint'\n\nexport default {\n  plugins: [\n    oxlintPlugin({\n      path: './src',\n      failOnError: true,\n      lintOnStart: true,\n      lintOnHotUpdate: true,\n      ignorePattern: 'tests/**',\n      allow: ['no-unused-vars'],\n      deny: ['no-console'],\n      warn: ['eqeqeq']\n    })\n  ]\n}","lang":"javascript","description":"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."},"warnings":[{"fix":"Use import statements in your project (set type: module in package.json or use .mjs files).","message":"v2.0.0 migrated from CommonJS to ESM-only. Require() will throw.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Set oxlintPath to an absolute path using path.resolve() or __dirname.","message":"oxlint binary path must be absolute if specified, otherwise plugin may pick global install incorrectly.","severity":"gotcha","affected_versions":">=1.6.0"},{"fix":"Set failOnError: true and/or failOnWarning: true to enforce lint pass.","message":"failOnError and failOnWarning default to false; build succeeds even with lint errors unless explicitly set.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Avoid using params unless necessary; prefer built-in options like allow, deny, warn, format.","message":"The 'params' option passes raw CLI flags; malformed or conflicting flags can cause silent failures or unexpected behavior.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use failOnWarning: false (default) to allow warnings without failing the build.","message":"The 'quiet' option suppresses warnings but may be deprecated in future in favor of 'failOnWarning: false' pattern.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Switch to import statement or use dynamic import().","cause":"Using CommonJS require() on an ESM-only package (v2.0.0+).","error":"ERR_REQUIRE_ESM: require() of ES Module /path/to/node_modules/vite-plugin-oxlint/dist/index.js from not supported."},{"fix":"Run npm install oxlint --save-dev (or yarn add oxlint --dev).","cause":"Missing oxlint peer dependency; oxlint binary not installed or not found.","error":"Error: Cannot find module 'oxlint' (or 'vite-plugin-oxlint' is not a peer dependency)"},{"fix":"Ensure oxlintPath is an absolute path to the oxlint binary. Use which oxlint to locate global install.","cause":"The oxlintPath points to a non-existent or non-executable file.","error":"Error: Oxlint binary not found at path 'path/to/oxlint'. Check oxlintPath option."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}