npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@plugjs/oxc

v0.1.2

Published

OXLint and OXFmt support for PlugJS

Readme

OXFmt and OXLint support for PlugJS

This plugin adds support for OXLint and OXFmt in PlugJS builds.

Contents

Installation

npm install --save-dev @plugjs/oxc

Linting

Linting support is provided by the oxlint plug.

import '@plugjs/oxc'
import { find, plugjs } from '@plugjs/plug'

export default plugjs({
  // ... all your other tasks
  async lint(): Promise<void> {
    await find('**/*', { directory: 'src' }).oxlint(/* ...config file or options */)
  },
})

The side-effect import import '@plugjs/oxc' installs the .oxlint() pipe method.

The oxlint plug by default will look for the default configuration files as specified in the OXLint documentation.

Alternatively, it can be parameterized by specifying a configuration file or a set of options which includes the following:

  • config: The path to the OXLint configuration file (string).
  • tsConfig: The path to the TypeScript configuration file (string).
  • fix: Whether to automatically fix linting errors (boolean, default: false).
  • reportUnusedDisableDirectives: Whether to report unused disable directives (boolean, default: true).
  • cwd: The current working directory for OXLint (string, default: current directory).

Standalone linting

OXLint can also be used directly as a utility (without piping file lists):

import { oxlint } from '@plugjs/oxc'
import { plugjs } from '@plugjs/plug'

export default plugjs({
  // ... all your other tasks
  async lint(): Promise<void> {
    await oxlint(/* ...paths to lint or options */)
  },
})

In this case, the paths to lint can be specified directly as string parameters (defaulting to all files in the current directory) or using the options specified above with the addition of:

  • paths: The list of paths to lint (array of strings).

NOTE: Those are paths, not matching globs. Specifically, OXLint does NOT support negative globs (e.g., !something) and will fail if you try to use them.

Formatting

Formatting support is provided by the oxfmt plug.

import '@plugjs/oxc'
import { find, plugjs } from '@plugjs/plug'

export default plugjs({
  // ... all your other tasks
  async format(): Promise<void> {
    await find('**/*', { directory: 'src' }).oxfmt(/* ...config file or options */)
  },
})

The side-effect import import '@plugjs/oxc' installs the .oxfmt() pipe method.

The oxfmt plug by default will look for the default configuration files as specified in the OXFmt documentation.

Alternatively, it can be parameterized by specifying a configuration file or a set of options which includes the following:

  • config: The path to the OXFmt configuration file (string).
  • fix: Whether to automatically fix formatting errors (boolean, default: false).
  • warnOnFormat: Whether to report formatting inconsistencies as warnings instead of errors (boolean, default: false).
  • cwd: The current working directory for OXFmt (string, default: current directory).

Standalone formatting

OXFmt can also be used directly as a utility (without piping file lists):

import { oxfmt } from '@plugjs/oxc'
import { plugjs } from '@plugjs/plug'

export default plugjs({
  // ... all your other tasks
  async format(): Promise<void> {
    await oxfmt(/* ...paths to format or options */)
  },
})

In this case, the paths to format can be specified directly as string parameters (defaulting to all files in the current directory) or using the options specified above with the addition of:

  • paths: The list of paths to format (array of strings).

Combined Formatting and Linting

Combined formatting and linting support is provided by the oxc plug. It runs OXFmt first, then OXLint, creating a single report for both operations.

import '@plugjs/oxc'
import { find, plugjs } from '@plugjs/plug'

export default plugjs({
  // ... all your other tasks
  async check(): Promise<void> {
    await find('**/*', { directory: 'src' }).oxc(/* ...options */)
  },
})

The side-effect import import '@plugjs/oxc' installs the .oxc() pipe method.

The oxc plug by default will look for the default configuration files as specified in the OXFmt and OXLint documentation.

Alternatively, it can be parameterized by specifying a set of options which includes the following:

  • oxfmtConfig: The path to the OXFmt configuration file (string).
  • oxlintConfig: The path to the OXLint configuration file (string).
  • tsConfig: The path to the TypeScript configuration file (string).
  • fix: Whether to automatically fix formatting and linting errors (boolean, default: false).
  • warnOnFormat: Whether to report formatting inconsistencies as warnings instead of errors (boolean, default: false).
  • reportUnusedDisableDirectives: Whether to report unused disable directives (boolean, default: true).
  • cwd: The current working directory for OXFmt and OXLint (string, default: current directory).

Standalone formatting and linting

OXFmt and OXLint can also be used together directly as a utility (without piping file lists):

import { oxc } from '@plugjs/oxc'
import { plugjs } from '@plugjs/plug'

export default plugjs({
  // ... all your other tasks
  async check(): Promise<void> {
    await oxc(/* ...paths to format and lint or options */)
  },
})

In this case, the paths to format and lint can be specified directly as string parameters (defaulting to all files in the current directory) or using the options specified above with the addition of:

  • paths: The list of paths to format and lint (array of strings).

NOTE: Those are paths, not matching globs. Specifically, OXLint does NOT support negative globs (e.g., !something) and will fail if you try to use them.

Default Configurations

This package also exports default OXFmt and OXLint configurations:

For example, an OXFmt configuration in another project can start from the default configuration like this:

import { defineConfig } from 'oxfmt'

import config from '@plugjs/oxc/configs/oxfmt'

export default defineConfig({
  // OXFmt does not support an `extends` option, so spread the default config.
  ...config,
})

An OXLint configuration can import either the generic default configuration or the Node.js-specific one:

import { defineConfig } from 'oxlint'

import config from '@plugjs/oxc/configs/oxlint.node'

export default defineConfig({
  extends: [config],
})