Overview
Oxlint is a production-ready linter that catches mistakes in your JavaScript and TypeScript code. It’s designed to be 50-100x faster than ESLint while maintaining compatibility with ESLint’s configuration format and rules.Lightning Fast
Lints 4800+ files in under 1 second. Built for monorepos and large codebases.
ESLint Compatible
Drop-in replacement supporting popular ESLint plugins and configurations.
200+ Rules
Comprehensive rule coverage including TypeScript, React, and more.
Auto-fixing
Automatically fix many issues with
--fix flag.Quick Start
Run without installation
Install locally
package.json:
package.json
CLI Usage
Basic Commands
CLI Options
- Basic Options
- Rules & Filters
- Fixing
- Output
- Plugins
- Advanced
| Flag | Description |
|---|---|
-c, --config <PATH> | Path to configuration file (.oxlintrc.json, .oxlintrc.jsonc, or oxlint.config.ts) |
--init | Initialize oxlint configuration with default values |
--tsconfig <PATH> | Path to TypeScript config for import plugin and path aliases |
Examples
Configuration
Configuration File
Create.oxlintrc.json in your project root:
.oxlintrc.json
Rule Configuration
Rules can be configured with severity levels and options:Overrides
Apply different rules to specific files:.oxlintrc.json
Ignore Patterns
Oxlint respects.gitignore by default. Additional patterns:
- Configuration File
- .oxlintignore File
- CLI Flag
.oxlintrc.json
Available Rules
View All Rules
Major Rule Collections
ESLint Core Rules
ESLint Core Rules
no-unused-vars- Disallow unused variablesno-console- Disallow console statementsno-debugger- Disallow debugger statementsprefer-const- Prefer const over letno-var- Disallow var declarationscurly- Enforce consistent brace style- And 100+ more…
TypeScript Rules
TypeScript Rules
@typescript-eslint/no-explicit-any- Disallow any type@typescript-eslint/no-unused-vars- TS-aware unused variables@typescript-eslint/ban-ts-comment- Ban @ts- comments@typescript-eslint/consistent-type-imports- Consistent imports- And 50+ more…
React Rules
React Rules
react/jsx-key- Enforce key prop in iteratorsreact/no-array-index-key- Prevent array index as keyreact/jsx-no-duplicate-props- No duplicate propsreact-hooks/rules-of-hooks- Enforce hooks rulesreact-hooks/exhaustive-deps- Check effect dependencies
Import Rules
Import Rules
import/no-cycle- Detect circular dependenciesimport/no-duplicates- No duplicate importsimport/extensions- Enforce file extensionsimport/no-self-import- Prevent self-imports
Unicorn Rules
Unicorn Rules
unicorn/filename-case- Enforce filename conventionsunicorn/no-null- Disallow nullunicorn/prefer-module- Prefer ES modulesunicorn/no-array-for-each- Prefer for-of
Performance
Benchmarks
On a typical codebase (VS Code repository with 4800+ files):| Tool | Time |
|---|---|
| oxlint | 0.7s |
| ESLint | 60s+ |
Oxlint is approximately 50-100x faster than ESLint on large codebases.
Performance Features
- Single AST pass: Most rules run in one traversal
- Parallel processing: Multi-threaded file processing
- Arena allocation: Efficient memory management
- Optimized parsing: Leverages oxc’s fast parser
Language Server Protocol (LSP)
Oxlint includes a built-in language server for editor integration:Editor Integration
- VS Code
- Neovim
- Other Editors
Install the oxc VS Code extension for:
- Real-time linting
- Quick fixes
- Rule documentation on hover
Migration from ESLint
Compatibility
Oxlint is designed for easy migration:- Config format: Supports ESLint-style configuration
- Rule names: Uses the same rule names as ESLint
- Plugins: Compatible with major ESLint plugins
- Output formats: Supports ESLint output formats
Migration Steps
CI/CD Integration
GitHub Actions
.github/workflows/lint.yml
GitLab CI
.gitlab-ci.yml
Pre-commit Hook
package.json
API Reference
For programmatic usage from Node.js or Rust, see:CLI Reference
Complete CLI command reference
Rust API
Build tools with oxc_linter crate
FAQ
Why is oxlint so much faster than ESLint?
Why is oxlint so much faster than ESLint?
Oxlint is written in Rust with performance as a primary goal. It uses:
- A highly optimized parser (oxc_parser)
- Arena allocation for memory efficiency
- Single-pass AST traversal for most rules
- Parallel file processing
- No plugin loading overhead
Does oxlint support all ESLint rules?
Does oxlint support all ESLint rules?
Oxlint implements the most commonly used ESLint rules and major plugins. Check
oxlint --rules for the complete list. If you need a specific rule, please open an issue on GitHub.Can I use oxlint with my existing ESLint config?
Can I use oxlint with my existing ESLint config?
Partially. Oxlint uses a similar config format but with some differences. Use
oxlint --init to generate a compatible config based on your project.Does oxlint support custom plugins?
Does oxlint support custom plugins?
Currently, oxlint has built-in support for major plugins (TypeScript, React, etc.). External JavaScript-based plugins are not yet supported, but this is planned for future releases.
Can I use oxlint in monorepos?
Can I use oxlint in monorepos?
Yes! Oxlint is designed for monorepos and large codebases. Use nested config files or the
--disable-nested-config flag to control configuration resolution.Resources
GitHub Repository
Source code and issue tracker
Rule Documentation
Complete rule reference
Discord Community
Get help and discuss features
npm Package
Install from npm