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

@forgrit/tsconfig

v0.2.0

Published

Shared TypeScript configuration presets for ForGrit projects — base (NodeNext ES2022 strict), node (with @types/node), library (composite + dist emit), commonjs-library (CJS+ES2020 for legacy publish targets).

Readme

@forgrit/tsconfig

Shared TypeScript configuration presets for ForGrit projects — base, node, and library. Zero runtime cost; just JSON.

npm version license: MIT

Status: early-access (v0.x). Pre-1.0 releases may include breaking changes in minor bumps until v1.0.0.


Install

npm install --save-dev @forgrit/tsconfig
# or
pnpm add -D @forgrit/tsconfig
# or
yarn add -D @forgrit/tsconfig

Usage

Extend the appropriate preset from your tsconfig.json:

Base preset

For library-agnostic TypeScript projects (frontend + backend + tooling):

{
  "extends": "@forgrit/tsconfig/base.json",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src",
  },
  "include": ["src/**/*.ts"],
}

Node preset

For Node.js projects that need @types/node:

{
  "extends": "@forgrit/tsconfig/node.json",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src",
  },
  "include": ["src/**/*.ts"],
}

You'll also need @types/node in your devDependencies:

npm install --save-dev @types/node

Library preset

For publishable npm libraries — sets rootDir/outDir and enables declaration emit:

{
  "extends": "@forgrit/tsconfig/library.json",
  // include is set to ["src/**/*.ts"]; override if needed
}

CommonJS library preset (new in v0.2.0)

For publishable npm libraries that need to ship CommonJS + ES2020 output (legacy Node.js compatibility, or consumers that haven't migrated to ESM yet):

{
  "extends": "@forgrit/tsconfig/commonjs-library.json",
  "compilerOptions": {
    // Optional per-package relaxations if the codebase predates strict defaults:
    // "noUncheckedIndexedAccess": false,
    // "isolatedModules": false,
  },
  "include": ["./**/*.ts"],
  "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"],
}

Inherits all of base.json's strictness + interop + decl emit, then overrides for CJS publish: target: ES2020, module: commonjs, moduleResolution: node, lib: [ES2020]. Also sets rootDir: ./, outDir: ./dist, composite: false, noEmit: false — matching the convention used by @forgrit/design-engine, @forgrit/design-intelligence, and @forgrit/contracts on npm.


What's enabled (base preset)

  • Target: ES2022 + ES2022 lib
  • Module: NodeNext + NodeNext moduleResolution (the modern Node.js + Bundler defaults)
  • Strict: strict: true + noUncheckedIndexedAccess: true (you'll thank yourself later)
  • Interop: esModuleInterop: true + forceConsistentCasingInFileNames: true
  • Performance: skipLibCheck: true + isolatedModules: true + incremental: true
  • Emit: declaration: true + declarationMap: true + sourceMap: true
  • JSON: resolveJsonModule: true
  • Excludes: node_modules, dist, .next, coverage

Why these defaults

  • NodeNext matches Node's actual module resolution (vs the bundler-flavored alternatives), eliminating "works in Vite, breaks in Node" bugs.
  • noUncheckedIndexedAccess catches the array[i] bug class (returns T when it should return T | undefined).
  • declaration + declarationMap are non-negotiable for any code consumed downstream; declarationMap makes "go to definition" jump to your .ts source instead of .d.ts.
  • isolatedModules + incremental keep both tsc and most bundlers (esbuild, swc, vite) happy.

License

MIT — see LICENSE.

Links

  • npm: https://www.npmjs.com/package/@forgrit/tsconfig
  • Source: https://github.com/forgrit-ai/forgrit/tree/main/tooling/tsconfig
  • Issues: https://github.com/forgrit-ai/forgrit/issues
  • ForGrit: https://forgrit.ai

Sibling packages (use these together)