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

@dbs-portal/tool-tsconfig

v1.0.0

Published

Shared TypeScript configurations for DBS Portal monorepo

Readme

@dbs-portal/tool-tsconfig

Shared TypeScript configurations for DBS Portal monorepo packages.

Features

  • 🎯 Strict Type Checking: Comprehensive type safety with strict mode enabled
  • ⚛️ React Support: Optimized configuration for React applications
  • 📚 Library Configuration: Specialized settings for library packages
  • 🔧 Node.js Support: Configuration for build scripts and tools
  • 🏗️ Monorepo Ready: Path mapping and workspace support
  • 🚀 Modern TypeScript: Latest TypeScript features and best practices

Installation

yarn add -D @dbs-portal/tool-tsconfig

Usage

Base Configuration

For general TypeScript projects:

{
  "extends": "@dbs-portal/tool-tsconfig/base.json",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    }
  }
}

React Applications

For React applications and components:

{
  "extends": "@dbs-portal/tool-tsconfig/react.json",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    }
  },
  "include": ["src/**/*", "vite.config.ts"]
}

Library Packages

For library packages that need to emit declarations:

{
  "extends": "@dbs-portal/tool-tsconfig/library.json",
  "compilerOptions": {
    "outDir": "dist",
    "rootDir": "src"
  }
}

Node.js Scripts

For build scripts and Node.js tools:

{
  "extends": "@dbs-portal/tool-tsconfig/node.json",
  "compilerOptions": {
    "outDir": "dist"
  }
}

Configurations

Base Configuration

  • Target: ES2022 with modern JavaScript features
  • Module: ESNext with bundler resolution
  • Strict Mode: Full TypeScript strict checking enabled
  • Path Mapping: Support for monorepo package references
  • JSX: React JSX transform support

React Configuration

Extends base configuration with:

  • React-specific JSX settings
  • Vite client types
  • React and React DOM types
  • Development optimizations

Library Configuration

Extends base configuration with:

  • Declaration file generation
  • Source maps for debugging
  • Stricter type checking
  • Library-compatible module settings

Node.js Configuration

Extends base configuration with:

  • Node.js types and environment
  • Relaxed rules for build scripts
  • CommonJS compatibility
  • ts-node configuration

Compiler Options

Type Checking

All configurations include strict type checking:

{
  "strict": true,
  "noUnusedLocals": true,
  "noUnusedParameters": true,
  "exactOptionalPropertyTypes": true,
  "noImplicitReturns": true,
  "noFallthroughCasesInSwitch": true,
  "noUncheckedIndexedAccess": true
}

Module Resolution

Modern module resolution with bundler support:

{
  "module": "ESNext",
  "moduleResolution": "bundler",
  "allowImportingTsExtensions": true,
  "verbatimModuleSyntax": true
}

Path Mapping

Monorepo-aware path mapping:

{
  "baseUrl": ".",
  "paths": {
    "@/*": ["./src/*"],
    "@dbs-portal/core-*": ["../core/*/src"],
    "@dbs-portal/module-*": ["../modules/*/src"],
    "@dbs-portal/tool-*": ["../tools/*/src"]
  }
}

Package-Specific Usage

Core Packages

{
  "extends": "@dbs-portal/tool-tsconfig/library.json",
  "compilerOptions": {
    "outDir": "dist",
    "rootDir": "src",
    "declaration": true
  }
}

Module Packages

{
  "extends": "@dbs-portal/tool-tsconfig/react.json",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"],
      "@dbs-portal/core-*": ["../../core/*/src"]
    }
  }
}

Application Packages

{
  "extends": "@dbs-portal/tool-tsconfig/react.json",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"],
      "@dbs-portal/*": ["../../*/src"]
    }
  }
}

Integration with Build Tools

Vite

Works seamlessly with Vite's TypeScript support:

// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')
    }
  }
})

ESLint

Configure ESLint to use the same TypeScript settings:

// .eslintrc.js
module.exports = {
  parserOptions: {
    project: './tsconfig.json'
  }
}

Scripts

Add to your package.json:

{
  "scripts": {
    "type-check": "tsc --noEmit",
    "type-check:watch": "tsc --noEmit --watch",
    "build": "tsc",
    "build:watch": "tsc --watch"
  }
}

VS Code Integration

Add to your VS Code settings:

{
  "typescript.preferences.includePackageJsonAutoImports": "on",
  "typescript.suggest.autoImports": true,
  "typescript.updateImportsOnFileMove.enabled": "always"
}

Troubleshooting

Path Mapping Issues

If path mapping doesn't work, ensure:

  1. baseUrl is set correctly
  2. Paths are relative to baseUrl
  3. Your bundler supports the same path mapping

Module Resolution

For module resolution issues:

  1. Check moduleResolution setting
  2. Verify allowImportingTsExtensions setting
  3. Ensure bundler compatibility

License

MIT