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

partial-ts-check

v0.1.0-beta.0

Published

CLI to run TypeScript checks and report only whitelisted files, ignoring blacklisted files.

Readme

partial-ts-check

⚠️ Beta Version: This package is currently in beta and was written mostly via AI under human supervision. Pull requests, advice, and feature requests are welcome through GitHub Issues!

A tiny CLI that runs tsc --noEmit and reports only TypeScript errors from whitelisted files while ignoring blacklisted files.

Perfect for migrating JavaScript codebases to TypeScript. When you start converting files and making them error-free, but the entire project still contains many errors, this tool lets you define which files to check.

Use it in git hooks to prevent commits with errors in already-migrated files, while allowing work to continue on files that haven't been migrated yet.

Install

npm install --save-dev partial-ts-check
# or
pnpm add -D partial-ts-check

Important: Make sure you have typescript installed in your project:

npm install --save-dev typescript
# or
pnpm add -D typescript

Usage

1. Configure in your project

Add a "partial-ts-check" block to your project's package.json:

{
  "partial-ts-check": {
    "whitelist": "ts-whitelist.js",
    "blacklist": "ts-blacklist.js",
    "printFilesList": true,
    "tsconfig": "tsconfig.json"
  }
}

Configuration options:

  • whitelist / whiteList: path to a .js or .cjs file that exports an array of file patterns to include
  • blacklist / blackList: path to a .js or .cjs file that exports an array of file patterns to exclude
  • printFilesList (optional): show short non-whitelisted errors (default: true)
  • tsconfig (optional): path to your tsconfig (default: tsconfig.json)

2. Create whitelist and blacklist files

Create .js or .cjs files that export an array of file patterns. You can use any part of the file path - full paths, folder names, or partial paths to match multiple files.

Example ts-whitelist.js:

// Files that must be error-free
export default [
  "src/components/",      // All files in components folder
  "src/utils/helpers.ts", // Specific file
  "src/auth/"             // All files in auth folder
];

Example ts-blacklist.js:

// Files to ignore completely
export default [
  "src/legacy/",   // All files in legacy folder
  "src/vendor/",   // All files in vendor folder
  ".test.ts",      // All test files
  "generated/"     // Any generated folder
];

3. Add a script

Add a script to your package.json:

{
  "scripts": {
    "ts:check-partial": "partial-ts-check"
  }
}

Then run:

npm run ts:check-partial
# or
pnpm ts:check-partial

4. Use in git hooks (recommended)

To prevent commits with errors in whitelisted files, add it to your pre-commit hook.

Using husky:

npx husky init
echo "npm run ts:check-partial" > .husky/pre-commit

Using lefthook:

Add to your lefthook.yml:

pre-commit:
  commands:
    ts-check:
      run: npm run ts:check-partial

Using lint-staged:

{
  "lint-staged": {
    "*.ts": "partial-ts-check"
  }
}

How it works

  • Resolves and runs your local node_modules/typescript/bin/tsc with --noEmit
  • Parses output, ignores blacklisted files, includes only whitelisted files
  • Exits non-zero if there are errors in whitelisted files; otherwise prints a short summary for the rest

Note: This tool uses the TypeScript compiler installed in your project, so make sure you have the typescript package installed as a dependency.

Requirements

  • Node >= 18
  • typescript installed in the consuming project

Contributing

See DEVELOPMENT.md for information about local development and testing.

License

MIT