Registry / testing / oxlint

oxlint

JSON →
library1.60.0jsnpmunverified

Oxlint is a JavaScript and TypeScript linter, part of the Oxc (Oxidation Compiler) suite, designed for extremely fast performance. It aims to provide a zero-configuration experience, allowing users to quickly integrate it into their projects. The current stable version is 1.60.0, and the project maintains a rapid release cadence, often releasing new minor versions (e.g., 1.58.0, 1.59.0, 1.60.0) and breaking changes at a frequent pace, sometimes weekly or bi-weekly. Key differentiators include its Rust-based implementation for speed and its focus on being an 'ESLint alternative' with built-in rules, avoiding the plugin ecosystem complexity of ESLint. It's intended to be run as a CLI tool.

npm install oxlint
INSTALL
IMPORT
SIG · OXLINT
O
oxlint
testingjavascriptv1.60.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Demonstrates how to install Oxlint and integrate it into package.json scripts for linting and auto-fixing a project, as well as one-off usage via npx.

{ "name": "my-project", "version": "1.0.0", "description": "A sample project using Oxlint.", "main": "index.js", "scripts": { "lint": "oxlint .", "lint:fix": "oxlint . --fix" }, "devDependencies": { "oxlint": "^1.60.0" } } // Run from your terminal: // npm install oxlint // npm run lint // npm run lint:fix // Or for a quick, temporary check without installation: // npx --yes oxlint@latest
oxlint --version
Debug
Known issues
breakingOxlint now errors if no files match the provided patterns, preventing silent failures where no files were linted. This changed the default behavior from silently succeeding.
fix
Ensure your glob patterns correctly match files, or explicitly provide file paths. Use `oxlint .` to lint all files in the current directory.
affects: >=1.60.0
breakingThe default behavior for showing and fixing safe suggestions in the LSP (Language Server Protocol) integration has changed. Previously, this might have required explicit configuration.
fix
Review your LSP client settings for Oxlint to ensure desired auto-fix behavior. If you prefer to manually trigger fixes, adjust your client configuration.
affects: >=1.59.0
breakingOxlint will now report an error if you specify a rule that is not a recognized built-in rule. This prevents typos or incorrect rule names from being silently ignored.
fix
Verify all custom rule configurations and ensure only valid, existing Oxlint rule names are used. Run `npx oxlint --rules` to see the list of available rules.
affects: >=1.58.0
gotchaOxlint is still under active and rapid development. Breaking changes are frequent across minor versions, requiring regular updates and review of release notes. The project prioritizes performance and rapid feature delivery, which can lead to API instability.
fix
Always pin to exact versions (e.g., `"oxlint": "1.60.0"`) or use caret ranges (`^1.60.0`) with caution. Regularly review changelogs when upgrading minor versions to identify breaking changes.
affects: >=1.0.0
gotchaThe `oxlint` npm package is primarily a Command-Line Interface (CLI) tool. It does not expose a public programmatic JavaScript/TypeScript API for direct `import` statements in user projects, unlike some other linter libraries.
fix
Interact with Oxlint via its CLI commands (e.g., `npx oxlint .`) or integrate it into your `package.json` scripts. If programmatic access to OxC's underlying parser or transformer is needed, explore the `oxc-project`'s other `napi` based packages or Rust crates directly if available and documented for external consumption.
affects: >=1.0.0
Errors
Common errors & fixes
Command 'oxlint' not found
Oxlint is not installed globally or locally, or `npx` is not being used.
fix
Run `npm install oxlint` in your project, or use `npx oxlint` for a temporary execution.
Error: No matched files. Please specify files to lint.
Oxlint found no files matching the patterns provided, or no patterns were given and it couldn't infer them. This became a hard error in v1.60.0.
fix
Specify target files explicitly, e.g., `oxlint src/` or `oxlint **/*.js`. If using `oxlint .`, ensure there are JavaScript/TypeScript files in the current directory or subdirectories.
Error: Unknown rule: 'my-custom-rule'. Please check the rule name.
A rule specified in the configuration (or implicitly via presets) does not exist in Oxlint's built-in rules. This became an error in v1.58.0.
fix
Correct the rule name or remove the invalid rule from your configuration. Consult `npx oxlint --rules` for a list of available rules.
SyntaxError: Unexpected token 'export'
Running `oxlint` CLI directly with an older Node.js version that does not support ESM without flags. Oxlint typically requires newer Node.js versions.
fix
Ensure your Node.js version meets the requirement of `>=20.19.0 || >=22.12.0`. Update Node.js or use a version manager like `nvm` to switch versions.
Upgrade
Version history
1.60.0latest on npm
Audit
Dependencies
oxlint-tsgolintrequiredPeer dependency for TypeScript language services and advanced linting features.
Agent activity
4 hits · last 30 days
node
4
Resources