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

@jobohner/ts-projects-config-presets

v0.5.0

Published

Basic config presets that I use in my TypeScript projects.

Readme

@jobohner/ts-projects-config-presets

Installation

npm install --save-dev @jobohner/ts-projects-config-presets

General

Set "type": "module" in your package.json.

Dependencies

This package comes with some dependencies already installed, so when installing this package, these dependencies don't necessarily need to be installed manually. Make sure to install this package as one of the devDependencies (like shown in the example installation prompt).

TypeScript

Config

I recommend using multiple tsconfig files:

One file tsconfig.json that will be used to check all your TypeScript files including test files etc.:

{
  "extends": "@jobohner/ts-projects-config-presets/tsconfig.json"
}

Optionally, project path specific compilerOptions may be added:

{
  "extends": "@jobohner/ts-projects-config-presets/tsconfig.json",
  "compilerOptions": {
    "typeRoots": ["./node_modules/@types"],
    "paths": { "index-alias": ["./src/index.js"] }
  }
}

This file can be used by your editor for hints. Additionally you may use a command like tsc --noEmit to check all your TypeScript files including test files and other files that would usually be disregarded during a build process.

Another file tsconfig.build.json may be used during compilation. It should specify that only relevant files are compiled:

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "dist",
    "declaration": true,
    "sourceMap": true
  },
  "include": ["src"],
  "exclude": ["node_modules", "dist", "**/*.test.ts"]
}

Run tsc --project tsconfig.build.json to compile using this file.

Execute .ts-files

Install tsx to run .ts-files (npx tsx path/name.ts)

Prettier

If you just want to use the preset settings without modifications, you could simply add a file .prettierrc.mjs with the following content:

export default '@jobohner/ts-projects-config-presets/.prettierrc.mjs'

In order to extend that config, your .prettierrc.mjs could look something like this:

import config from '@jobohner/ts-projects-config-presets/.prettierrc.mjs'

/** @type {import("prettier").Config} */
export default {
  ...config,
  // additional config
}

ESLint

If you just want to use the preset settings without modifications, you could simply add a file eslint.config.js with the following content:

export default '@jobohner/ts-projects-config-presets/eslint.config.js'

Or, with modifications:

// @ts-check

import tseslint from 'typescript-eslint'
import configs from '@jobohner/ts-projects-config-presets/eslint.config.js'

/** @type {import('eslint').Linter.Config[]} */
export const customConfig = [
  { ignores: ['**/node_modules/', '**/dist/', '**/coverage/'] },
  // ... other local custom rules
]

export default tseslint.config(...configs, customConfig)

For linting including the more expensive type checks you can use a command like

eslint --max-warnings 0 --config ./node_modules/@jobohner/ts-projects-config-presets/eslint-type-checked.config.js .

or create a new eslint config file that utilizes eslint.config.js:

// @ts-check

import tseslint from 'typescript-eslint'
import configs from '@jobohner/ts-projects-config-presets/eslint.config.js'

import { customConfig } from './eslint.config.js'

export default tseslint.config(...configs, customConfig)

The type checks of the latter file are not included in the standard eslint.config.js, because they are more expensive, so that it is not desirable to have them run by your editor's eslint plugin. Instead use these checks infrequently, e. g. prior to initiating a build process.

vitest

I recommend using vitest over jest, because it seems to work better with TypeScript using ES-Modules.

import { defineConfig, mergeConfig } from 'vitest/config'
import vitestConfig from '@jobohner/ts-projects-config-presets/vitest.config.js'

export default mergeConfig(
  vitestConfig,
  defineConfig({
    // additional config
  }),
)