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

@setemiojo/oxlint-config

v0.1.6

Published

Shareable OXC toolchain config for oxlint and oxfmt

Readme

@setemiojo/oxlint-config

npm

Shareable oxlint + oxfmt config for the OXC toolchain.

  • Reasonable defaults, best practices, only one line of config
  • Auto-detects TypeScript and React — zero config for most projects
  • Composable presets: base, typescript, react, node, testing, next, tanstackRouter
  • Optional oxfmt formatter preset — single quotes, no semi, trailing commas, sorted imports
  • Requires oxlint ≥ 1.0.0

[!WARNING] This is a personal config with strong opinions. Changes may not suit every project or team.

If you use this config directly, review changes every time you update. Or fork it and maintain your own.

Usage

Starter Wizard

Run the CLI to set up oxlint and oxfmt in your project with one command:

pnpm dlx @setemiojo/oxlint-config@latest

The wizard will:

  • Auto-detect installed packages (TypeScript, React, etc.) and pre-select the right presets
  • Write oxlint.config.ts using setemiojo()
  • Write oxfmt.config.ts or .oxfmtrc.json for the formatter
  • Add lint:ox and format:ox scripts to package.json

Manual Install

pnpm i -D oxlint @setemiojo/oxlint-config

Create oxlint.config.ts in your project root:

// oxlint.config.ts
import { setemiojo } from '@setemiojo/oxlint-config'
import { defineConfig } from 'oxlint'

export default defineConfig(setemiojo())

Add scripts to package.json

{
  "scripts": {
    "lint:ox": "oxlint .",
    "lint:ox:fix": "oxlint . --fix"
  }
}

IDE Support

Install the oxc VS Code extension.

Add the following to your .vscode/settings.json:

{
  // Enable oxlint
  "oxc.enable": true,

  // Auto-fix on save
  "editor.codeActionsOnSave": {
    "source.fixAll.oxc": "explicit"
  }
}

Install the oxc Zed extension.

Add the following to your .zed/settings.json:

{
  "code_actions_on_format": {
    "source.fixAll.oxc": true
  }
}

Customization

Auto-detection

setemiojo() auto-detects your project's installed packages and enables the right presets:

| Detected package | Preset enabled | |---|---| | typescript | typescript | | react, react-dom, @tanstack/react-router, @tanstack/start | react |

All other presets are opt-in:

// oxlint.config.ts
import { setemiojo } from '@setemiojo/oxlint-config'
import { defineConfig } from 'oxlint'

export default defineConfig(setemiojo({
  // explicitly override auto-detection
  typescript: true,
  react: true,

  // opt-in extras
  node: true,
  testing: true,
  next: true,
  tanstackRouter: true,
}))

Presets

You can also import individual presets and compose them manually:

// oxlint.config.ts
import { base, react, typescript, node } from '@setemiojo/oxlint-config'
import { defineConfig } from 'oxlint'

export default defineConfig({
  extends: [
    ...base,
    ...typescript,
    ...react,
    ...node,
  ],
})

Check out the configs and factory for more details.

React

React support is automatically detected when any of the following packages are installed:

  • react / react-dom
  • @tanstack/react-router / @tanstack/start

Or explicitly enable it:

export default defineConfig(setemiojo({ react: true }))

Node.js

export default defineConfig(setemiojo({ node: true }))

Testing

Enables rules for test files (vitest, jest):

export default defineConfig(setemiojo({ testing: true }))

Next.js

export default defineConfig(setemiojo({ next: true }))

TanStack Router

Requires the optional peer dependency @tanstack/eslint-plugin-router:

pnpm i -D @tanstack/eslint-plugin-router
export default defineConfig(setemiojo({ tanstackRouter: true }))

oxfmt

Install the formatter:

pnpm i -D oxfmt

With oxfmt.config.ts (Node ≥ 22.18)

// oxfmt.config.ts
import { oxfmt } from '@setemiojo/oxlint-config/oxfmt'

export default oxfmt()

With .oxfmtrc.json

node -e "const {oxfmt}=await import('@setemiojo/oxlint-config/oxfmt');const fs=await import('node:fs');fs.writeFileSync('.oxfmtrc.json',JSON.stringify(oxfmt(),null,2)+'\\n')"

Customize formatter options

import { oxfmt } from '@setemiojo/oxlint-config/oxfmt'

export default oxfmt({
  printWidth: 120,
  singleQuote: false,
  semi: true,
  trailingComma: 'es5',
  sortImports: true,
})

Default options:

| Option | Default | |---|---| | printWidth | 100 | | tabWidth | 2 | | useTabs | false | | semi | false | | singleQuote | true | | trailingComma | "all" | | insertFinalNewline | true | | sortImports | false | | sortPackageJson | true |

Add scripts to package.json

{
  "scripts": {
    "format:ox": "oxfmt .",
    "format:ox:check": "oxfmt . --check"
  }
}

Versioning Policy

This project follows Semantic Versioning. However, since this is a config with opinions, rule changes are not treated as breaking changes.

Breaking changes

  • Node.js version requirement changes
  • oxlint major version bumps that affect config shape
  • Removal of exported presets or factory options

Non-breaking changes

  • Enabling or tightening rules within a preset
  • Rule option changes
  • Dependency version bumps

FAQ

Why oxlint instead of ESLint?

oxlint is 50–100× faster than ESLint. For large codebases, the difference is seconds vs. minutes. It covers the most important correctness and suspicious rules with zero plugin setup.

Why oxfmt instead of Prettier?

oxfmt is built on OXC's Rust parser — significantly faster than Prettier's JS parser. It intentionally stays close to Prettier's output so migration is easy.

Can I use this alongside ESLint?

Yes. oxlint and ESLint target different things and don't conflict. oxlint is a fast first pass for correctness rules; ESLint handles complex type-aware and stylistic rules.

Check Also

License

MIT License © 2026-PRESENT Oluwasetemi Ojo