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/eslint-config-node

v3.0.4

Published

ESLint configuration for Node.js projects with TypeScript, extending base config with Node.js-specific rules

Readme

@jmlweb/eslint-config-node

npm version License: MIT Node.js ESLint

ESLint flat config for Node.js with TypeScript. Extends @jmlweb/eslint-config-base with eslint-plugin-n rules and Node.js globals.

🔧 Maintenance mode: only dependency and security updates, no new rules. For new projects use @jmlweb/oxlint-config-node. To move an existing project, see the migration guide.

✨ Features

  • 🟢 Node.js rules: eslint-plugin-n recommended plus stricter module, process and API rules
  • 🌐 Node.js globals: process, Buffer, __dirname and friends
  • 🔒 Strict TypeScript: everything from @jmlweb/eslint-config-base
  • 📦 node: protocol: built-in modules must use the node: prefix
  • 🎨 Prettier compatible: disables rules that conflict with Prettier

📦 Installation

npm install --save-dev @jmlweb/eslint-config-node @jmlweb/eslint-config-base eslint @eslint/js typescript-eslint eslint-config-prettier eslint-plugin-simple-import-sort eslint-plugin-n globals

💡 Upgrading? See the Migration Guide.

🚀 Quick Start

// eslint.config.js
import nodeConfig from '@jmlweb/eslint-config-node';

export default [
  ...nodeConfig,
  // Project-specific overrides
];

💡 Examples

Test overrides and ignores

// eslint.config.js
import nodeConfig from '@jmlweb/eslint-config-node';

export default [
  ...nodeConfig,
  {
    files: ['**/*.test.ts', '**/*.spec.ts'],
    rules: {
      '@typescript-eslint/no-explicit-any': 'off',
      'n/no-process-exit': 'off',
    },
  },
  {
    ignores: ['dist/', 'build/', 'node_modules/'],
  },
];

Soften Node.js rules

// eslint.config.js
import nodeConfig from '@jmlweb/eslint-config-node';

export default [
  ...nodeConfig,
  {
    files: ['**/*.ts', '**/*.js'],
    rules: {
      'n/no-process-exit': 'warn',
      'n/no-unpublished-import': 'off',
    },
  },
];

📋 Configuration Details

Applied to **/*.ts, **/*.js, **/*.mjs and **/*.cjs, with globals.node enabled.

Included

  • ✅ Everything from @jmlweb/eslint-config-base
  • ✅ eslint-plugin-n flat/recommended
  • ✅ Import and export sorting, Prettier conflict resolution

Key rules

| Rule | Level | | -------------------------------------------------------------------------------- | ------------------ | | n/no-process-exit, n/process-exit-as-throw | error | | n/no-missing-import, n/no-missing-require | error | | n/no-unpublished-import, n/no-unpublished-require | error | | n/no-extraneous-import, n/no-extraneous-require | error | | n/no-deprecated-api | warn | | n/no-callback-literal, n/no-new-require, n/no-path-concat | error | | n/prefer-global/* (buffer, console, process, url, url-search-params) | error (always) | | n/prefer-promises/dns, n/prefer-promises/fs | error | | n/prefer-node-protocol | error |

🔄 Import Sorting

Imports are sorted and type-only imports are enforced.

Before:

import { Component } from './component';
import express from 'express';
import fs from 'node:fs';
import { User } from './types';

After eslint --fix:

import express from 'express';
import fs from 'node:fs';
import { type User } from './types';
import { Component } from './component';

🎯 When to Use

  • ✅ Node.js libraries, CLIs and services written in TypeScript
  • ✅ Catching missing or unpublished imports and deprecated APIs
  • ✅ Strict type-aware linting for backend code

For non-Node.js TypeScript use @jmlweb/eslint-config-base. For new projects prefer @jmlweb/oxlint-config-node.

🔧 Extending the Configuration

Spread the config, then add objects after it. Later entries win.

// eslint.config.js
import nodeConfig from '@jmlweb/eslint-config-node';

export default [
  ...nodeConfig,
  {
    files: ['scripts/**/*.js'],
    rules: {
      'n/no-process-exit': 'off',
    },
  },
];

📝 Usage with Scripts

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}
npm run lint

📋 Requirements

  • Node.js >= 22.12.0
  • ESLint ^9.0.0 || ^10.0.0 (flat config)
  • TypeScript project with a tsconfig.json (versions supported by typescript-eslint 8)

📦 Peer Dependencies

  • eslint (^9.0.0 || ^10.0.0)
  • @eslint/js (^9.0.0 || ^10.0.0)
  • typescript-eslint (^8.0.0)
  • eslint-config-prettier (^9.1.0 || ^10.0.0)
  • eslint-plugin-n (^17.0.0 || ^18.0.0)
  • eslint-plugin-simple-import-sort (^12.0.0 || ^13.0.0 || ^14.0.0)
  • globals (^15.0.0 || ^16.0.0 || ^17.0.0)
  • @jmlweb/eslint-config-base (^3.0.3)

🔗 Related Packages

🔄 Migration Guide

2.x to 3.0

Node.js 18 and 20 are end-of-life. Node.js >= 22.12.0 is now required: it is the first Node.js 22 release that can require() ES modules without a flag, which the CommonJS build needs to load ESM-only plugins. Peer ranges were also widened (eslint-plugin-n 18, eslint-plugin-simple-import-sort 13 and 14).

  1. Upgrade Node.js to 22.12.0 or later.
  2. Update the package: npm install --save-dev @jmlweb/eslint-config-node@latest.

See the Changelog.

📄 License

MIT