or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

cli.mdconfiguration.mdindex.mdnodejs-api.mdoutput-formats.mdplugins.mdrules.md
tile.json

tessl/npm-oxlint

High-performance JavaScript and TypeScript linter written in Rust, designed as part of the Oxc (Oxidation Compiler) suite of tools

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/oxlint@1.16.x

To install, run

npx @tessl/cli install tessl/npm-oxlint@1.16.0

index.mddocs/

Oxlint

Oxlint is a high-performance JavaScript and TypeScript linter written in Rust, providing 50-100x faster linting than ESLint while maintaining compatibility with JavaScript and TypeScript standards. It features comprehensive rule coverage, zero-configuration setup for immediate use, and integrates seamlessly with development workflows.

Package Information

  • Package Name: oxlint
  • Package Type: npm (binary distribution), cargo (Rust crate)
  • Language: Rust with JavaScript/TypeScript bindings
  • Installation:
    • npm: npm install -D oxlint
    • npx: npx --yes oxlint@latest
    • cargo: Available as part of oxc workspace
  • Requirements: Node.js >=20.0.0 (for npm bindings)

Core Usage

Command Line Interface

# Basic usage
oxlint [OPTIONS] [PATH...]

# Quick start - lint current directory
npx oxlint@latest

# Lint specific files/directories
oxlint src/ test/
oxlint --config .oxlintrc.json src/

# Apply automatic fixes
oxlint --fix src/

# Custom output format
oxlint --format json src/

Basic Configuration File

.oxlintrc.json:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["typescript", "react", "import"],
  "env": {
    "browser": true,
    "node": true
  },
  "rules": {
    "eqeqeq": "error",
    "no-debugger": "warn",
    "react/jsx-uses-vars": "error"
  }
}

Node.js API Usage

import { lint } from "oxlint";

// JavaScript plugin interface (experimental)
// Available on 64-bit little-endian platforms only
const success = await lint(
  (pluginPath) => loadPluginFromPath(pluginPath),
  (filePath, bufferId, buffer, ruleIds) => processLintResults(filePath, buffer, ruleIds)
);

Architecture

Oxlint is built around several key components:

  • CLI Interface: Command-line parser with extensive configuration options
  • Linting Engine: High-performance Rust-based linting core from oxc_linter
  • Plugin System: Modular plugins for different frameworks and rule sets
  • Configuration System: ESLint-compatible configuration with JSON schema validation
  • Output Formatters: Multiple output formats for different CI/CD and editor integrations
  • Fix Engine: Safe automatic code fixing for compatible rules
  • NAPI Bindings: JavaScript/TypeScript API through Node.js native bindings
  • Multi-platform: Support for Windows, macOS, Linux on x64 and ARM64

Capabilities

Command Line Interface

Comprehensive CLI with support for file selection, rule configuration, plugin management, and output formatting. Includes advanced options for parallel processing and configuration debugging.

oxlint [OPTIONS] [PATH...]

Command Line Interface

Configuration System

ESLint-compatible configuration system supporting rules, plugins, environments, and file-specific overrides. Uses JSON schema for validation and IDE integration.

{
  "plugins": string[],
  "rules": Record<string, "off" | "warn" | "error" | [string, any]>,
  "env": Record<string, boolean>,
  "overrides": Array<ConfigOverride>
}

Configuration

Plugin System

Modular plugin architecture supporting built-in and external plugins for different frameworks, testing libraries, and coding standards.

# Enable/disable plugins
oxlint --react-plugin --import-plugin src/
oxlint --disable-typescript-plugin src/

Plugins

Output Formatting

Multiple output format options for integration with different tools, CI/CD systems, and development environments.

# Available formats
oxlint --format default|json|stylish|checkstyle|github|gitlab|junit|unix

Output Formats

Rule Categories and Management

Hierarchical rule categorization system with fine-grained control over rule severity and scope.

# Rule management
oxlint -A all -D correctness -W suspicious
oxlint --allow no-debugger --deny pedantic

Rule Management

Node.js/JavaScript API

Experimental JavaScript plugin interface for advanced integrations and custom linting workflows.

// Main lint function for JavaScript plugins
function lint(
  loadPlugin: (path: string) => Promise<string>,
  lintFile: (filePath: string, bufferId: number, buffer: Uint8Array | null, ruleIds: number[]) => string
): Promise<boolean>;

Node.js API

Environment Variables

Runtime configuration through environment variables.

# Control logging levels and targets
OXC_LOG=oxc_resolver oxlint --import-plugin src/

# Version override (build-time)
OXC_VERSION=custom-build oxlint --version

Platform Support

Supported platforms for npm binary distribution:

  • Windows: x64, ARM64
  • macOS: x64 (Intel), ARM64 (Apple Silicon)
  • Linux: x64 GNU/musl, ARM64 GNU/musl

File Extensions

Supported file extensions for linting:

  • JavaScript: .js, .mjs, .cjs, .jsx
  • TypeScript: .ts, .mts, .cts, .tsx
  • Vue: .vue (with vue plugin)
  • Svelte: .svelte (basic support)
  • Astro: .astro (basic support)

Types

// Main CLI result enumeration
enum CliRunResult {
  None,
  LintSucceeded,
  LintFoundErrors,
  LintMaxWarningsExceeded,
  LintNoWarningsAllowed,
  LintNoFilesFound,
  PrintConfigResult,
  ConfigFileInitSucceeded,
  ConfigFileInitFailed,
  InvalidOptionConfig,
  InvalidOptionTsConfig,
  InvalidOptionSeverityWithoutFilter,
  InvalidOptionSeverityWithoutPluginName,
  InvalidOptionSeverityWithoutRuleName,
  TsGoLintError
}

// Output format options
enum OutputFormat {
  Default,
  Json,
  Github,
  Gitlab,
  Unix,
  Checkstyle,
  Stylish,
  JUnit
}

// Rule severity levels
enum AllowWarnDeny {
  Allow,
  Warn,
  Deny
}

// Node.js plugin interface types
type LoadPluginCallback = (path: string) => Promise<string>;
type LintFileCallback = (
  filePath: string,
  bufferId: number,
  buffer: Uint8Array | null,
  ruleIds: number[]
) => string;

// Platform architecture types
type SupportedPlatform =
  | "win32-x64" | "win32-arm64"
  | "linux-x64-gnu" | "linux-arm64-gnu"
  | "linux-x64-musl" | "linux-arm64-musl"
  | "darwin-x64" | "darwin-arm64";

// Exit codes mapping
interface ExitCodes {
  success: 0;
  failure: 1;
  // Maps to CliRunResult enum values
}