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

@ashtrath/oxc-config

v0.1.0

Published

Ashtrath's OXC (oxlint + oxfmt) config

Readme

@ashtrath/oxc-config

License: MIT npm version Powered by OXC

Opinionated Oxlint and Oxfmt configuration factories for TypeScript projects, with an interactive setup wizard and automatic preset composition.

The factory architecture follows the composable design popularized by Anthony Fu in @antfu/eslint-config, adapted for native Oxlint and Oxfmt toolchains.

Quick start

Run the interactive CLI wizard in your project root:

# Bun
bunx @ashtrath/oxc-config

# pnpm
pnpm dlx @ashtrath/oxc-config

# npm
npx @ashtrath/oxc-config

The wizard:

  1. Detects your package manager from lockfiles.
  2. Identifies project frameworks (React, Next.js, Tailwind CSS).
  3. Writes oxlint.config.ts and oxfmt.config.ts.
  4. Adds lint, lint:fix, and fmt scripts to package.json.
  5. Configures .vscode/settings.json for format-on-save.

Manual installation

Install @ashtrath/oxc-config and peer dependencies:

# Bun
bun add -D @ashtrath/oxc-config oxlint oxfmt

# pnpm
pnpm add -D @ashtrath/oxc-config oxlint oxfmt

# npm
npm i -D @ashtrath/oxc-config oxlint oxfmt

Optional peer dependencies for framework support:

# Tailwind CSS sorting and lint rules
bun add -D oxlint-tailwindcss

# React Doctor inspection rules
bun add -D oxlint-plugin-react-doctor

# Anti-slop heuristic rules
bun add -D @ashtrath/oxlint-plugin-slop

Configuration

Linter (oxlint.config.ts)

Export the result of ashtrathLint:

import ashtrathLint from '@ashtrath/oxc-config/lint'

export default ashtrathLint({
  // Project type: 'app' (default) or 'lib'
  type: 'app',

  // Framework toggles (auto-detected by CLI)
  react: true,
  nextjs: false,

  // Tailwind CSS configuration
  tailwindcss: {
    entryPoint: 'src/index.css',
  },

  // Anti-slop heuristic checks
  antislop: true,

  // Ignore patterns
  ignorePatterns: ['dist/**', 'coverage/**'],
})

You can pass extra Oxlint configuration items or overrides as trailing arguments:

import ashtrathLint from '@ashtrath/oxc-config/lint'

export default ashtrathLint(
  { type: 'lib' },
  {
    rules: {
      'no-console': 'warn',
    },
  },
)

Formatter (oxfmt.config.ts)

Export the result of ashtrathFmt:

import ashtrathFmt from '@ashtrath/oxc-config/fmt'

export default ashtrathFmt({
  // Default options: 2 spaces, single quotes, no semicolons, trailing commas, print width 100
  sortImports: true,
  sortPackageJson: true,
  sortTailwindcss: true,
  jsdoc: true,
})

Custom file override objects pass directly as trailing arguments:

import ashtrathFmt from '@ashtrath/oxc-config/fmt'

export default ashtrathFmt(
  {},
  {
    files: ['**/*.md'],
    tabWidth: 4,
  },
)

Presets

ashtrathLint packages these presets:

| Preset | Target | Description | | --------------- | ---------------------- | ------------------------------------------------------------------ | | javascript | All files | Base syntax checks, modern idiom enforcement, and console controls | | typescript | *.ts, *.tsx | TypeScript strictness, type assertions, and app vs lib rules | | perfectionist | All files | Natural sorting for imports, exports, and object keys | | antislop | All files | AST heuristic rules from @ashtrath/oxlint-plugin-slop | | react | JSX / TSX | React hooks and React Doctor diagnostics | | nextjs | Next.js projects | Routing rules and framework conventions | | tailwindcss | Class attributes | Class sorting and duplicate class detection | | vitest | *.test.*, *.spec.* | Test assertions and suite structure | | e18e | All files | Ecosystem cleanup and package dependency hygiene | | unicorn | All files | Modern standard library patterns | | node | Node scripts | Node runtime globals and process controls | | regexp | Regex literals | Regular expression correctness and backtracking checks | | comments | Directives | Suppression comments and unused disable reporting |

VS Code settings

Install the Oxc VS Code extension.

Add these settings to .vscode/settings.json:

{
  "prettier.enable": false,
  "editor.defaultFormatter": "oxc.oxc-vscode",
  "editor.formatOnSave": true,
  "editor.formatOnSaveMode": "file",
  "editor.codeActionsOnSave": {
    "source.fixAll.oxc": "explicit",
    "source.organizeImports": "never"
  },
  "[javascript]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
  "[javascriptreact]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
  "[typescript]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
  "[typescriptreact]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
  "[json]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
  "[jsonc]": { "editor.defaultFormatter": "oxc.oxc-vscode" }
}

Scripts

Add standard scripts to package.json:

{
  "scripts": {
    "lint": "oxlint",
    "lint:fix": "oxlint --fix",
    "fmt": "oxfmt --write --no-error-on-unmatched-pattern"
  }
}

Acknowledgements

License

MIT