High-performance JavaScript and TypeScript linter written in Rust, designed as part of the Oxc (Oxidation Compiler) suite of tools
npx @tessl/cli install tessl/npm-oxlint@1.16.0Oxlint 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.
npm install -D oxlintnpx --yes oxlint@latest# 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/.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"
}
}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)
);Oxlint is built around several key components:
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...]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>
}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/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|unixHierarchical 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 pedanticExperimental 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>;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 --versionSupported platforms for npm binary distribution:
Supported file extensions for linting:
.js, .mjs, .cjs, .jsx.ts, .mts, .cts, .tsx.vue (with vue plugin).svelte (basic support).astro (basic support)// 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
}