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 oxlintNo compatibility data collected yet for this library.
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.
Ensure your glob patterns correctly match files, or explicitly provide file paths. Use `oxlint .` to lint all files in the current directory.
Review your LSP client settings for Oxlint to ensure desired auto-fix behavior. If you prefer to manually trigger fixes, adjust your client configuration.
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.
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.
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.
Run `npm install oxlint` in your project, or use `npx oxlint` for a temporary execution.
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.
Correct the rule name or remove the invalid rule from your configuration. Consult `npx oxlint --rules` for a list of available rules.
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.