WORLDBOOK

oxlint | Worldbooks | WebMCP | Search | Submit

oxlint

Category: Unknown Author: Unknown Version: 1.0.0 Updated: Unknown
0

Oxlint

Website: https://oxc.rs CLI Tool: oxlint Repository: https://github.com/oxc-project/oxc Documentation: https://oxc.rs/docs/guide/usage/linter/cli License: MIT

Description

Oxlint is a JavaScript/TypeScript linter that is 50-100x faster than ESLint. Part of the Oxc (Oxidation Compiler) project, it's written in Rust for maximum performance. Includes 690+ rules covering correctness, suspicious code, pedantic issues, and performance. Supports plugins for Promise, Node.js, Vue, and more.

Install

# npm
npm install -D oxlint

# pnpm
pnpm add -D oxlint

# yarn
yarn add -D oxlint

# bun
bun add -D oxlint

Or run directly:

npx oxlint@latest

Usage

Basic Linting

# Lint current directory
oxlint

# Lint specific path
oxlint src/

# Lint specific files
oxlint src/**/*.ts

Fix Issues

# Auto-fix safe issues
oxlint --fix

# Apply suggestions (may change behavior)
oxlint --fix-suggestions

# Apply dangerous fixes
oxlint --fix-dangerously

Rule Categories

# Enable all rules
oxlint -A all

# Disable correctness, enable no-debugger
oxlint -D correctness -A no-debugger

# Enable specific categories
oxlint -A suspicious
oxlint -A pedantic
oxlint -A perf

TypeScript Support

# With tsconfig
oxlint --tsconfig ./tsconfig.json

# Type-aware linting (alpha)
oxlint --type-check --type-aware

Plugins

# Enable plugins
oxlint --promise-plugin
oxlint --node-plugin
oxlint --vue-plugin

Ignore Files

# Use ignore file
oxlint --ignore-path .gitignore

# Ignore pattern
oxlint --ignore-pattern "dist/**"

# Disable all ignores
oxlint --no-ignore

Output Formats

oxlint --format json
oxlint --format github
oxlint --format gitlab
oxlint --format junit
oxlint --format checkstyle
oxlint --format unix
oxlint --format stylish

Commands

Option Description
--fix Fix auto-fixable issues
--fix-suggestions Apply suggestions (may change behavior)
--fix-dangerously Apply dangerous fixes
-A <rule> Allow/enable rule or category
-D <rule> Deny/disable rule or category
--tsconfig <path> TypeScript config path
--ignore-path <path> Custom ignore file
--ignore-pattern <pat> Ignore pattern
--no-ignore Disable ignore files
--format <fmt> Output format
--init Initialize config

Configuration

Create .oxlintrc.json:

{
  "rules": {
    "no-debugger": "error",
    "no-console": "warn"
  },
  "env": {
    "browser": true,
    "node": true
  }
}

package.json Scripts

{
  "scripts": {
    "lint": "oxlint",
    "lint:fix": "oxlint --fix"
  }
}

Rule Categories

Category Description
correctness Likely bugs (default enabled)
suspicious Suspicious patterns
pedantic Style and best practices
perf Performance issues

Examples

CI Setup

# Fast CI linting
oxlint --format github

# With specific rules
oxlint -A correctness -A suspicious --format junit > lint-results.xml

Migrate from ESLint

# Install migration tool
npx oxlint-migrate

# Run alongside ESLint during migration
npm run eslint && npm run oxlint

Project-wide Config

# Initialize config
oxlint --init

# Then customize .oxlintrc.json

Notes

  • Performance: 50-100x faster than ESLint
  • 690+ rules: Comprehensive coverage
  • Zero config: Works out of the box
  • ESLint compatible: Similar rule names and config format
  • Rust-powered: Part of Oxc toolchain
  • Type-aware: Alpha support for TypeScript type checking
  • Plugin system: Promise, Node.js, Vue plugins available
  • CI-friendly: Multiple output formats for different CI systems

Get this worldbook via CLI

worldbook get oxlint

Comments (0)

Add a Comment

No comments yet. Be the first to comment!