High-performance JavaScript and TypeScript linter written in Rust, designed as part of the Oxc (Oxidation Compiler) suite of tools
Oxlint provides a comprehensive command-line interface for linting JavaScript and TypeScript files with extensive configuration options.
oxlint [OPTIONS] [PATH...]Parameters:
PATH... - Files or directories to lint (defaults to current directory)# Configuration file (JSON only, comments supported)
oxlint --config .oxlintrc.json
oxlint -c path/to/config.json
# TypeScript configuration for path aliases and project references
oxlint --tsconfig ./tsconfig.json
# Initialize configuration with defaults
oxlint --init# Allow rules or categories (suppress linting)
oxlint --allow RULE_OR_CATEGORY
oxlint -A RULE_OR_CATEGORY
# Warn on rules or categories
oxlint --warn RULE_OR_CATEGORY
oxlint -W RULE_OR_CATEGORY
# Deny rules or categories (error level)
oxlint --deny RULE_OR_CATEGORY
oxlint -D RULE_OR_CATEGORYRule Categories:
correctness - Code that is outright wrong or useless (default)suspicious - Code that is most likely wrong or uselesspedantic - Strict lints with occasional false positivesstyle - Code style and idiomatic patternsnursery - New lints under developmentrestriction - Prevents use of certain language featuresall - All categories except nursery# Apply safe automatic fixes
oxlint --fix
# Apply suggestion fixes (may change behavior)
oxlint --fix-suggestions
# Apply dangerous fixes and suggestions
oxlint --fix-dangerously# Output format selection
oxlint --format FORMAT
oxlint -f FORMAT
# Available formats: default, json, stylish, checkstyle, github, gitlab, junit, unix
# Warning handling
oxlint --quiet # Suppress warnings, errors only
oxlint --deny-warnings # Treat warnings as errors
oxlint --max-warnings 10 # Maximum warning threshold# Enable plugins (off by default)
oxlint --react-plugin # React and React Hooks rules
oxlint --import-plugin # Import/export rules (experimental)
oxlint --jsdoc-plugin # JSDoc rules
oxlint --jest-plugin # Jest testing rules
oxlint --vitest-plugin # Vitest testing rules
oxlint --jsx-a11y-plugin # Accessibility rules
oxlint --nextjs-plugin # Next.js specific rules
oxlint --react-perf-plugin # React performance rules
oxlint --promise-plugin # Promise rules
oxlint --node-plugin # Node.js rules
oxlint --regex-plugin # Regular expression rules
oxlint --vue-plugin # Vue.js rules
# Disable plugins (on by default)
oxlint --disable-unicorn-plugin
oxlint --disable-oxc-plugin
oxlint --disable-typescript-plugin# Performance and threading
oxlint --threads 4 # Number of CPU threads (default: auto)
oxlint --silent # Suppress all output
# Type-aware linting (requires TypeScript configuration)
oxlint --type-aware
# Configuration debugging
oxlint --print-config # Show resolved configuration
oxlint --disable-nested-config # Disable auto config file loading
# Rule information
oxlint --rules # List all available rules
# Experimental features
oxlint --experimental-js-plugins # Enable experimental JS plugins# Command-line ignore patterns
oxlint --ignore-pattern "**/*.test.js"
oxlint --ignore-pattern "dist/*"
# Specify custom ignore file (default: .eslintignore)
oxlint --ignore-path .myignore
# Disable all ignore file processing
oxlint --no-ignore
# Ignore file support
# Reads .oxlintignore, .eslintignore, and .gitignore files automatically# Report unused disable directives
oxlint --report-unused-disable-directives
# Report with specific severity (allow|warn|error)
oxlint --report-unused-disable-directives-severity allow
oxlint --report-unused-disable-directives-severity warn
oxlint --report-unused-disable-directives-severity error# Lint current directory with default settings
oxlint
# Lint specific files and directories
oxlint src/ test/ index.js
# Lint with configuration file
oxlint --config .oxlintrc.json src/# Allow all rules, then deny specific categories
oxlint -A all -D correctness -D suspicious src/
# Mix of allow/deny for fine-grained control
oxlint -D suspicious --allow no-debugger -W pedantic src/# Enable React and import plugins for React projects
oxlint --react-plugin --import-plugin --tsconfig tsconfig.json src/
# Disable default plugins for minimal linting
oxlint --disable-unicorn-plugin --disable-oxc-plugin src/# Apply safe fixes with JSON output
oxlint --fix --format json src/
# Apply all fixes including dangerous ones
oxlint --fix-dangerously src/
# GitHub Actions integration
oxlint --format github src/# Fail build on any warnings
oxlint --deny-warnings --format junit src/ > test-results.xml
# Set warning threshold for gradual adoption
oxlint --max-warnings 50 src/
# Quiet mode for CI (errors only)
oxlint --quiet --format checkstyle src/LintSucceeded - No errors foundPrintConfigResult - Configuration printed successfullyConfigFileInitSucceeded - Config file created successfullyLintNoFilesFound - No files to lint (currently returns 0)LintFoundErrors - Linting errors foundLintMaxWarningsExceeded - Warning threshold exceededLintNoWarningsAllowed - Warnings found when --deny-warnings usedConfigFileInitFailed - Failed to create config fileInvalidOptionConfig - Invalid configuration fileInvalidOptionTsConfig - Invalid tsconfig.jsonInvalidOptionSeverityWithoutFilter - Severity option without rule filterInvalidOptionSeverityWithoutPluginName - Severity without plugin nameInvalidOptionSeverityWithoutRuleName - Severity without rule nameTsGoLintError - Type-aware linting error# Control logging levels and targets for debugging
OXC_LOG=oxc_resolver oxlint --import-plugin src/
OXC_LOG=debug oxlint src/
# Version override (build-time only)
OXC_VERSION=custom-buildSupported file extensions:
.js, .mjs, .cjs, .jsx.ts, .mts, .cts, .tsx.vue (requires --vue-plugin).svelte (basic support).astro (basic support)Install with Tessl CLI
npx tessl i tessl/npm-oxlint