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

@jmlweb/oxlint-config-node

v0.1.3

Published

Oxlint configuration for Node.js projects, extending @jmlweb/oxlint-config-base

Readme

@jmlweb/oxlint-config-node

npm version License: MIT Node.js

Oxlint configuration for Node.js. Extends @jmlweb/oxlint-config-base and ports @jmlweb/eslint-config-node. Recommended linter for Node.js projects.

✨ Features

  • 🟢 eslint-plugin-n: flat/recommended plus stricter best practices, run as an Oxlint JS plugin
  • ⚡ Native where possible: Rules Oxlint implements itself use its faster node/* version
  • 📦 Dependency checks: Missing, extraneous and unpublished imports, resolved against package.json
  • 🌐 Node.js globals: process, Buffer, __dirname and the rest, for JS and TS files
  • 🔒 Everything from the base config: Strict TypeScript rules, no enums, named exports only

📦 Installation

npm install --save-dev @jmlweb/oxlint-config-node oxlint oxlint-tsgolint eslint-plugin-n

🚀 Quick Start

Create oxlint.config.ts in your project root:

import nodeConfig from '@jmlweb/oxlint-config-node';
import { defineConfig } from 'oxlint';

export default defineConfig({
  extends: [nodeConfig],
  options: {
    typeAware: true,
  },
});

⚠️ Set typeAware in your own config. Oxlint reads options only from the root config, so type-aware rules are skipped without it.

💡 Examples

Before

import fs from 'fs';
import { parse } from 'yaml';

export const loadConfig = (dir: string): unknown => {
  const file = dir + '/config.yml';
  if (!fs.existsSync(file)) {
    process.exit(1);
  }
  fs.readFile(file, 'utf8', () => undefined);
  return parse(fs.readFileSync(file, 'utf8'));
};

Problems Reported

With yaml missing from package.json:

src/config.ts:1:16: error n(prefer-node-protocol): Prefer `node:fs` over `fs`.
src/config.ts:2:23: error n(no-missing-import): Can't resolve 'yaml' in '/path/to/project/src'
src/config.ts:7:5: error n(no-process-exit): Don't use process.exit(); throw an error instead.
src/config.ts:9:3: error n(prefer-promises/fs): Use 'fs.promises.readFile()' instead.
src/config.ts:10:10: error typescript(no-unsafe-call): Unsafe call of a(n) `error` type typed value.

📋 Configuration Details

All files: eslint-plugin-n flat/recommended rules (deprecated APIs, features unsupported by your engines.node, missing/extraneous/unpublished imports, hashbangs) plus the rules below. Node.js globals apply to **/*.{js,mjs,cjs,ts,mts,cts} through an override, because Oxlint drops a top-level env from configs loaded through extends.

| Rule | Level | Description | | ------------------------- | ------- | --------------------------------------------------- | | n/no-process-exit | error | Throw instead of calling process.exit() | | n/process-exit-as-throw | error | Treats process.exit() as a throw for control flow | | n/no-deprecated-api | warn | Flags deprecated Node.js APIs | | n/no-callback-literal | error | Callbacks receive an error or null first | | n/prefer-node-protocol | error | Use node: imports for built-ins | | n/prefer-promises/fs | error | Use fs.promises over callback APIs | | n/prefer-promises/dns | error | Use dns.promises over callback APIs | | n/prefer-global/* | error | Use Buffer, console, process, URL globals | | node/no-new-require | error | No new require(...) | | node/no-path-concat | error | Use path.join() with __dirname/__filename | | node/no-exports-assign | error | No assigning to exports |

node/* rules are Oxlint's native versions of the matching n/* rules; the rest run through the JS plugin (still in alpha in Oxlint).

Differences from @jmlweb/eslint-config-node

🎯 When to Use

  • ✅ Fast linting for Node.js libraries, CLIs and servers (recommended)
  • ✅ Checking that every import is declared in package.json
  • ✅ Migrating from @jmlweb/eslint-config-node (maintenance mode)

Browser or React, use @jmlweb/oxlint-config-base or @jmlweb/oxlint-config-react.

🔧 Extending the Configuration

import nodeConfig from '@jmlweb/oxlint-config-node';
import { defineConfig } from 'oxlint';

export default defineConfig({
  extends: [nodeConfig],
  options: {
    typeAware: true,
  },
  overrides: [
    {
      // CLIs may exit with a status code
      files: ['src/cli.ts'],
      rules: {
        'n/no-process-exit': 'off',
      },
    },
    {
      // Scripts and tests may import devDependencies
      files: ['scripts/**', '**/*.test.ts'],
      rules: {
        'n/no-unpublished-import': 'off',
      },
    },
  ],
});

CLIs Built to dist/

eslint-plugin-n compares sources with the bin and files paths in package.json, which point at build output. That triggers n/hashbang ("This file needs no shebang.") on src/cli.ts, and n/no-missing-import on scripts that import build output before it exists. Map sources to output with n.convertPath and turn the rule off for post-build scripts:

import nodeConfig from '@jmlweb/oxlint-config-node';
import { defineConfig } from 'oxlint';

export default defineConfig({
  extends: [nodeConfig],
  settings: {
    n: {
      convertPath: [
        {
          include: ['src/**/*.ts'],
          replace: ['^src/(.+)\\.ts$', 'dist/$1.js'],
        },
      ],
    },
  },
  overrides: [
    {
      files: ['scripts/**'],
      rules: {
        'n/no-missing-import': 'off',
      },
    },
  ],
});

📝 Usage with Scripts

{
  "scripts": {
    "lint": "oxlint",
    "lint:fix": "oxlint --fix"
  }
}
npm run lint      # Lint all files
npm run lint:fix  # Fix auto-fixable problems

📋 Requirements

  • Node.js >= 22.12.0
  • Oxlint >= 1.87.0
  • engines.node in your package.json (used by the unsupported-feature rules)
  • TypeScript project with a tsconfig.json (for type-aware rules)

📦 Peer Dependencies

  • oxlint (>=1.87.0)
  • oxlint-tsgolint (>=7.0.0, optional): enables type-aware rules
  • eslint-plugin-n (^17.0.0 || ^18.0.0)

@jmlweb/oxlint-config-base is a regular dependency; do not install it separately.

🔗 Related Packages

📄 License

MIT