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/typescript-config

v3.0.1

Published

Strict TypeScript configuration presets for ESM and CommonJS projects

Readme

@chuli-dev/typescript-config

Strict TypeScript configuration presets for ESM and CommonJS projects.

✨ Features

  • ESM and CommonJS - Dedicated presets for both module systems
  • Strict by default - Most strict TypeScript validations enabled
  • Multi-platform - Presets for Node.js, Web, React, and libraries
  • Library presets are composite - Ready for TypeScript project references
  • Zero-config - Sensible defaults that work out of the box

📦 Installation

npm install --save-dev @chuli-dev/typescript-config typescript

🚀 Quick Start

Choose the configuration that matches your project:

Node.js Application

{
  "extends": "@chuli-dev/typescript-config/node",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist"
  },
  "include": ["src/**/*.ts"],
  "exclude": ["dist", "node_modules", "**/*.test.ts", "**/*.spec.ts"]
}

Web/Browser Application

{
  "extends": "@chuli-dev/typescript-config/web",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist"
  },
  "include": ["src/**/*.ts"],
  "exclude": ["dist", "node_modules", "**/*.test.ts", "**/*.spec.ts"]
}

React Application

{
  "extends": "@chuli-dev/typescript-config/react",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist"
  },
  "include": ["src/**/*.ts", "src/**/*.tsx"],
  "exclude": [
    "dist",
    "node_modules",
    "**/*.test.ts",
    "**/*.test.tsx",
    "**/*.spec.ts",
    "**/*.spec.tsx"
  ]
}

Library (npm package)

{
  "extends": "@chuli-dev/typescript-config/lib",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist"
  },
  "include": ["src/**/*.ts"],
  "exclude": ["dist", "node_modules", "**/*.test.ts", "**/*.spec.ts"]
}

Use this setup for framework-agnostic libraries when your source code lives in src/.

Node.js Library (npm package)

{
  "extends": "@chuli-dev/typescript-config/node.lib",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist"
  },
  "include": ["src/**/*.ts"],
  "exclude": ["dist", "node_modules", "**/*.test.ts", "**/*.spec.ts"]
}

Use this setup for libraries that run in Node.js and need Node.js typings.

CommonJS Variants

For projects that target CommonJS (or for the CJS half of a dual ESM/CJS build), use the .cjs variants:

{
  "extends": "@chuli-dev/typescript-config/node.cjs",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist"
  },
  "include": ["src/**/*.ts"],
  "exclude": ["dist", "node_modules", "**/*.test.ts", "**/*.spec.ts"]
}

Available CJS presets: lib.cjs, node.cjs, node.cjs.lib. They emit module: "CommonJS" and disable verbatimModuleSyntax (incompatible with CommonJS output).

📋 Available Configurations

| Configuration | Description | Use Case | | ------------------ | --------------------------------------------------------------- | --------------------------- | | base | Minimal ESM setup with strict validations | Custom ESM setups | | lib | ESM library (composite, declaration via composite) | Publishing ESM npm packages | | lib.cjs | CommonJS library (composite, declaration via composite) | Publishing CJS npm packages | | node | Node.js ESM with Node typings | ESM server applications | | node.lib | Node.js ESM library (composite, declaration via composite) | ESM Node.js packages | | node.cjs | Node.js CommonJS with Node typings | CJS server applications | | node.cjs.lib | Node.js CommonJS library (composite, declaration via composite) | CJS Node.js packages | | web | Browser environment (ESM) | Web applications | | react | React with JSX support (ESM) | React applications |

📝 Notes

  • Library presets enable composite: true, which implicitly enables declaration. They are ready to participate in TypeScript project references (tsc -b). Configure rootDir, outDir, tsBuildInfoFile, include, and exclude in your project.
  • Use lib / lib.cjs for framework-agnostic libraries, and node.lib / node.cjs.lib when your library needs Node typings.
  • For dual ESM/CJS builds, run tsc -b against two configs (one extending lib / node.lib and one extending lib.cjs / node.cjs.lib) outputting to separate folders, each with its own tsBuildInfoFile.
  • The exclude patterns shown are examples. Keep tests in exclude only if they should not be part of your build output.
  • noUnusedLocals is not enabled by default. Turn it on if you want it.

🔧 Requirements

  • TypeScript >=5.0.0
  • Node.js >=20.0.0

📄 License

MIT - see the LICENSE file for details.

👤 Author

chuli-dev - @TomasAntunez