CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-oxlint

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

Overview
Eval results
Files

output-formats.mddocs/

Output Formats

Oxlint provides multiple output format options to integrate with different development tools, CI/CD systems, and editor environments. Each format serves specific use cases and provides different levels of detail and structure.

Available Output Formats

Default Format

oxlint --format default
# or simply
oxlint

Human-readable output optimized for terminal display with color coding and clear problem descriptions.

Example output:

src/index.js:5:1 - error(no-debugger): Unexpected 'debugger' statement
src/utils.js:12:5 - warn(prefer-const): 'data' is never reassigned. Use 'const' instead of 'let'

✖ 2 problems (1 error, 1 warning)
  1 error and 0 warnings potentially fixable with the `--fix` option

JSON Format

oxlint --format json

Machine-readable JSON output ideal for programmatic processing and tool integration.

Structure:

[
  {
    "filePath": "src/index.js",
    "messages": [
      {
        "ruleId": "no-debugger",
        "severity": 2,
        "message": "Unexpected 'debugger' statement",
        "line": 5,
        "column": 1,
        "nodeType": "DebuggerStatement",
        "fix": null
      }
    ],
    "errorCount": 1,
    "warningCount": 0,
    "fixableErrorCount": 0,
    "fixableWarningCount": 0
  }
]

Stylish Format

oxlint --format stylish

Clean, organized output similar to ESLint's stylish formatter, grouped by file with aligned columns.

Example output:

src/index.js
  5:1  error    Unexpected 'debugger' statement  no-debugger

src/utils.js
  12:5  warning  'data' is never reassigned. Use 'const' instead of 'let'  prefer-const

✖ 2 problems (1 error, 1 warning)

Checkstyle Format

oxlint --format checkstyle

XML format compatible with Checkstyle tools and many CI/CD systems.

Structure:

<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="8.0">
  <file name="src/index.js">
    <error line="5" column="1" severity="error" message="Unexpected 'debugger' statement" source="no-debugger"/>
  </file>
</checkstyle>

GitHub Format

oxlint --format github

Output format for GitHub Actions annotations that appear in pull request reviews and workflow summaries.

Example output:

::error file=src/index.js,line=5,col=1::Unexpected 'debugger' statement (no-debugger)
::warning file=src/utils.js,line=12,col=5::'data' is never reassigned. Use 'const' instead of 'let' (prefer-const)

GitLab Format

oxlint --format gitlab

Code Quality report format compatible with GitLab CI/CD pipelines.

Structure:

[
  {
    "type": "issue",
    "check_name": "no-debugger",
    "description": "Unexpected 'debugger' statement",
    "fingerprint": "hash_value",
    "severity": "major",
    "location": {
      "path": "src/index.js",
      "lines": {
        "begin": 5
      }
    }
  }
]

JUnit Format

oxlint --format junit

JUnit XML format for test result integration and CI/CD reporting.

Structure:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="oxlint" tests="2" failures="1" errors="1" time="0">
    <testcase classname="src/index.js" name="no-debugger">
      <failure message="Unexpected 'debugger' statement"/>
    </testcase>
  </testsuite>
</testsuites>

Unix Format

oxlint --format unix

Compact format suitable for Unix/Linux tools and scripting.

Example output:

src/index.js:5:1: Unexpected 'debugger' statement [Error/no-debugger]
src/utils.js:12:5: 'data' is never reassigned. Use 'const' instead of 'let' [Warning/prefer-const]

Format-Specific Use Cases

Development Workflow

# Terminal development with colored output
oxlint --format default src/

# Clean output for code review
oxlint --format stylish src/

CI/CD Integration

# GitHub Actions workflow
oxlint --format github src/

# GitLab CI with Code Quality reports
oxlint --format gitlab src/ > code-quality.json

# JUnit for test reporting dashboards
oxlint --format junit src/ > lint-results.xml

# Checkstyle for Java-ecosystem tools
oxlint --format checkstyle src/ > checkstyle-results.xml

Programmatic Processing

# JSON for custom tooling and scripts
oxlint --format json src/ | jq '.[] | select(.errorCount > 0)'

# Unix format for grep/awk processing
oxlint --format unix src/ | grep "Error" | wc -l

Editor Integration

Most editors and Language Server Protocol implementations prefer structured formats:

# JSON format for editor plugins
oxlint --format json src/

# Checkstyle for IDE integration
oxlint --format checkstyle src/

Output Customization

Silent Mode

# Suppress all output except exit codes
oxlint --silent src/

Warning Control

# Suppress warnings, show errors only
oxlint --quiet --format json src/

# Treat warnings as errors
oxlint --deny-warnings --format github src/

Diagnostic Information

Additional information can be included with specific formats:

# Include file count and timing information
oxlint --format default src/  # Shows summary statistics

# Configuration debugging
oxlint --print-config --format json  # Shows resolved config

Format Selection Guidelines

Choose based on your use case:

  • default/stylish - Human reading, terminal development
  • json - Programmatic processing, custom tooling
  • github - GitHub Actions, pull request reviews
  • gitlab - GitLab CI/CD, merge request integration
  • junit - Test reporting, dashboard integration
  • checkstyle - Java ecosystem tools, legacy CI systems
  • unix - Shell scripting, Unix tool chains

Performance considerations:

  • JSON format has slight overhead for large outputs
  • Default format includes color codes (disable with NO_COLOR=1)
  • Silent mode provides fastest execution for exit-code-only scenarios

Install with Tessl CLI

npx tessl i tessl/npm-oxlint

docs

cli.md

configuration.md

index.md

nodejs-api.md

output-formats.md

plugins.md

rules.md

tile.json