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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@outfitter/typescript-config

v1.0.4

Published

Shared TypeScript configurations for Outfitter projects

Downloads

13

Readme

@outfitter/typescript-config

Shared TypeScript configurations for consistent, strict type safety across Outfitter projects

Installation

npm install --save-dev @outfitter/typescript-config
# or
pnpm add -D @outfitter/typescript-config

Usage

Extend one of the provided configurations in your tsconfig.json:

Base Configuration (Recommended)

For general TypeScript projects:

{
  "extends": "@outfitter/typescript-config/base",
  "compilerOptions": {
    "outDir": "dist",
    "rootDir": "src"
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist"]
}

Next.js Configuration

For Next.js applications:

{
  "extends": "@outfitter/typescript-config/next",
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
  "exclude": ["node_modules"]
}

Vite Configuration

For Vite-based applications:

{
  "extends": "@outfitter/typescript-config/vite",
  "include": ["src", "vite.config.ts"],
  "exclude": ["node_modules", "dist"]
}

What's Included

Strict Type Safety

All configurations enforce maximum type safety:

  • strict: true: Enables all strict type checking options
  • noImplicitAny: true: No implicit any types allowed
  • strictNullChecks: true: Null and undefined must be handled explicitly
  • noUncheckedIndexedAccess: true: Array/object access returns T | undefined
  • exactOptionalPropertyTypes: true: Optional properties can't be set to undefined

Modern JavaScript

  • Target: ES2022 with ES2023 library features
  • Module: ESNext with bundler resolution
  • verbatimModuleSyntax: true: Explicit import/export syntax

Developer Experience

  • Path Mapping: @/* maps to ./src/* by default
  • Incremental Builds: Faster subsequent compilations
  • Declaration Maps: Better IDE navigation to source

Code Quality

  • noUnusedLocals: true: Catch unused variables
  • noUnusedParameters: true: Catch unused function parameters
  • noImplicitReturns: true: All code paths must return
  • noFallthroughCasesInSwitch: true: Explicit break/return in switch cases

Configuration Details

Base Configuration

The strictest configuration for maximum type safety and code quality. Use this for:

  • Libraries
  • Node.js applications
  • General TypeScript projects

Next.js Configuration

Extends base with Next.js-specific settings:

  • JSX support for React
  • Next.js module resolution
  • Optimized for Next.js build system

Vite Configuration

Extends base with Vite-specific settings:

  • JSX support for React
  • Vite-compatible module resolution
  • Client-side DOM types

Customization

Override any setting in your local tsconfig.json:

{
  "extends": "@outfitter/typescript-config/base",
  "compilerOptions": {
    // Example: Allow unused locals during development
    "noUnusedLocals": false,

    // Example: Custom paths
    "paths": {
      "@/*": ["./src/*"],
      "@components/*": ["./src/components/*"]
    }
  }
}

Best Practices

  1. Don't disable strict checks: Work with the type system, not against it
  2. Handle all cases: The configs force you to handle edge cases explicitly
  3. Use path aliases: Keep imports clean with the @/* alias
  4. Enable project references: For monorepos, use TypeScript project references

Migration Guide

For detailed instructions on migrating from a loose TypeScript configuration to strict settings, see the TypeScript Migration Guide.

Development

This package is part of the @outfitter/monorepo monorepo.

See the Development Guide for instructions on building, testing, and contributing to this package.

License

MIT