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

@chuli-dev/eslint-config

v3.1.0

Published

Self-contained ESLint flat-config presets for modern TypeScript projects

Downloads

496

Readme

@chuli-dev/eslint-config

Self-contained ESLint flat-config presets for modern TypeScript projects.

✨ Features

  • One import, one preset - Each preset is a complete ESLint flat config; just export default it
  • Three orthogonal axes - TypeScript (none / strict / type-aware) × Node.js × ESM enforcement
  • Flat config ready - Built for ESLint v9+ eslint.config.js
  • Practical defaults - Strong rules for code quality, imports, and consistency

📦 Installation

npm install --save-dev @chuli-dev/eslint-config eslint @eslint/js eslint-config-prettier eslint-plugin-simple-import-sort eslint-plugin-unused-imports eslint-plugin-n globals typescript typescript-eslint

Each preset only depends on a subset of the peers above:

| Peer dependency | Required by | | ---------------------------------- | ---------------------------- | | eslint | All presets | | @eslint/js | All presets | | eslint-config-prettier | All presets | | eslint-plugin-simple-import-sort | All presets | | eslint-plugin-unused-imports | All presets | | globals | All presets | | eslint-plugin-n | Any node / *Node* preset | | typescript | Any typescript* preset | | typescript-eslint | Any typescript* preset |

With npm v7+, peer dependencies are installed automatically when you add @chuli-dev/eslint-config.

🚀 Quick Start

Pick the preset that matches your project and use it directly as your flat config:

// eslint.config.js
import { typescriptTypecheckedNodeEsm } from '@chuli-dev/eslint-config';

export default typescriptTypecheckedNodeEsm;

📋 Available Presets

| Preset | TypeScript | Node.js | ESM enforcement | | ---------------------------------- | ---------- | ------- | --------------- | | base | — | — | — | | node | — | ✓ | — | | esm | — | — | ✓ | | nodeEsm | — | ✓ | ✓ | | typescript | strict | — | — | | typescriptEsm | strict | — | ✓ | | typescriptNode | strict | ✓ | — | | typescriptNodeEsm | strict | ✓ | ✓ | | typescriptTypechecked | type-aware | — | — | | typescriptTypecheckedEsm | type-aware | — | ✓ | | typescriptTypecheckedNode | type-aware | ✓ | — | | typescriptTypecheckedNodeEsm | type-aware | ✓ | ✓ |

What each axis adds

  • TypeScript strict - Enables typescript-eslint's strict ruleset without type information.
  • TypeScript type-aware - Adds rules that require type information (no-floating-promises, no-misused-promises, etc.). Requires a valid tsconfig.json.
  • Node.js - Adds Node globals and eslint-plugin-n rules (no-deprecated-api, prefer-node-protocol, no-process-exit).
  • ESM enforcement - Forces sourceType: 'module', disables CJS globals, and forbids require() / module.exports syntax.

🔀 Import order

All presets sort imports via eslint-plugin-simple-import-sort into these groups, separated by a blank line:

  1. Side-effect imports — import './polyfills'
  2. Node.js built-ins with the node: protocol — import { readFile } from 'node:fs/promises'
  3. External packages — import React from 'react', import { z } from 'zod'
  4. Absolute internal paths (see below)
  5. Parent-relative imports — import foo from '../foo'
  6. Same-folder relative imports — import bar from './bar'

Absolute path prefixes

For the absolute-path group to pick up your internal imports, the specifier must start with one of these prefixes:

| Prefix | Typical use | | ------------ | ------------------------------------------ | | @/ | Common Next.js / Vite default | | ~/ | Alternative root alias | | src/ | When baseUrl is the project root | | @src/ | Aliased src/ root | | app/ | App-scoped alias | | @app/ | Aliased app-scoped alias | | libs/ | Monorepo libs/ root | | @libs/ | Aliased monorepo libs/ root | | packages/ | Turborepo / pnpm monorepo packages/ root | | @packages/ | Aliased monorepo packages/ root | | shared/ | Shared workspace folder | | @shared/ | Aliased shared workspace |

Imports that don't match any of these fall through to the external-package group and get mixed with react, zod, etc. — which is usually not what you want. Either rename your alias to one of the prefixes above, or override the rule as shown below.

Customizing the groups

Presets are plain flat-config arrays, so you can append a config object that re-declares simple-import-sort/imports. The full groups array must be redeclared — the plugin does not merge.

// eslint.config.js
import { typescriptTypecheckedNodeEsm } from '@chuli-dev/eslint-config';

export default [
  ...typescriptTypecheckedNodeEsm,
  {
    rules: {
      'simple-import-sort/imports': [
        'warn',
        {
          groups: [
            ['^\\u0000'],
            ['^node:'],
            ['^@?\\w'],
            // Add your own prefix here (e.g. `#internal/`):
            [
              '^(@/|~\\/|src/|@src/|app/|@app/|libs/|@libs/|packages/|@packages/|shared/|@shared/|#internal/)',
            ],
            ['^\\.\\.(?!/?$)', '^\\.\\./?$'],
            ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
          ],
        },
      ],
    },
  },
];

Each entry in groups is itself an array of regex strings; imports matching any regex inside the inner array land in that group, and groups are separated by blank lines in the output.

📝 Notes

  • All presets include eslint-config-prettier to disable rules that conflict with Prettier formatting.
  • Type-aware presets (*Typechecked*) lint only *.ts, *.tsx, *.mts files and require a tsconfig.json at the project root (via projectService).

🔧 Requirements

  • Node.js >=20
  • ESLint >=9
  • TypeScript >=5 (only if using TypeScript presets)

📄 License

MIT - see the LICENSE file for details.

👤 Author

chuli-dev - @TomasAntunez