All Projects → nadeesha → Ts Prune

nadeesha / Ts Prune

Licence: mit
Find unused exports in a typescript project. 🛀

Programming Languages

typescript
32286 projects

Labels

Projects that are alternatives of or similar to Ts Prune

React Lodash
⚛️ 🔧 Lodash as React components
Stars: ✭ 306 (-25.73%)
Mutual labels:  utility
Electron About Window
'About This App' mini-window for Electron apps
Stars: ✭ 339 (-17.72%)
Mutual labels:  utility
Monolingual
Remove unnecessary language resources from macOS.
Stars: ✭ 393 (-4.61%)
Mutual labels:  utility
Addlicense
A program which ensures source code files have copyright license headers by scanning directory patterns recursively
Stars: ✭ 318 (-22.82%)
Mutual labels:  utility
Mbpmid2010 gpufix
MBPMid2010_GPUFix is an utility program that allows to fix MacBook Pro (15-inch, Mid 2010) intermittent black screen or loss of video. The algorithm is based on a solution provided by user fabioroberto on MacRumors forums.
Stars: ✭ 334 (-18.93%)
Mutual labels:  utility
Mac Mouse Fix
Mac Mouse Fix - A simple way to make your mouse better.
Stars: ✭ 362 (-12.14%)
Mutual labels:  utility
Cryptocmd
Cryptocurrency historical price data library in Python. Data from https://coinmarketcap.com.
Stars: ✭ 299 (-27.43%)
Mutual labels:  utility
Macroable
A trait to dynamically add methods to a class
Stars: ✭ 415 (+0.73%)
Mutual labels:  utility
Ms
Tiny millisecond conversion utility
Stars: ✭ 3,762 (+813.11%)
Mutual labels:  utility
Gdx Texture Packer Gui
A simple way to pack and manage texture atlases for LibGDX game framework.
Stars: ✭ 371 (-9.95%)
Mutual labels:  utility
Org Wiki
Wiki for Emacs org-mode built on top of Emacs org-mode.
Stars: ✭ 319 (-22.57%)
Mutual labels:  utility
Underscore.string
String manipulation helpers for javascript
Stars: ✭ 3,355 (+714.32%)
Mutual labels:  utility
Jql
A JSON Query Language CLI tool
Stars: ✭ 368 (-10.68%)
Mutual labels:  utility
Encryptpad
Minimalist secure text editor and binary encryptor that implements RFC 4880 Open PGP format: symmetrically encrypted, compressed and integrity protected. The editor can protect files with passwords, key files or both.
Stars: ✭ 305 (-25.97%)
Mutual labels:  utility
Common.utility
Various helper class
Stars: ✭ 4,101 (+895.39%)
Mutual labels:  utility
Nyrna
Nyrna - Suspend games and applications.
Stars: ✭ 303 (-26.46%)
Mutual labels:  utility
Vuex Rest Api
A utility to simplify the use of REST APIs with Vuex
Stars: ✭ 365 (-11.41%)
Mutual labels:  utility
Rm Protection
A safe alternative for "rm".
Stars: ✭ 416 (+0.97%)
Mutual labels:  utility
Lodash Php
Easy to use utility functions for everyday PHP projects. This is a port of the Lodash JS library to PHP
Stars: ✭ 412 (+0%)
Mutual labels:  utility
Version Checker
Kubernetes utility for exposing image versions in use, compared to latest available upstream, as metrics.
Stars: ✭ 371 (-9.95%)
Mutual labels:  utility

Build David npm GitHub issues

ts-prune

Remove unused exports in your Typescript project with zero configuration.

asciicast

Getting Started

ts-prune exposes a cli that reads your tsconfig file and prints out all the unused exports in your source files.

Installing

Install ts-prune with yarn or npm

npm install ts-prune -g

Usage

ts-prune

Or you can install it in your project and alias it to a npm script in package.json.

  "scripts": {
    "find-deadcode": "ts-prune"
  }

If you want to run against different Typescript configuration than tsconfig.json:

ts-prune -p tsconfig.dev.json

Configuration

ts-prune supports CLI and file configuration via cosmiconfig (all file formats are supported).

Configuration options

  • -p, --project - tsconfig.json path(tsconfig.json by default)
  • -i, --ignore - errors ignore RegExp pattern

CLI configuration options:

ts-prune -p my-tsconfig.json -i my-component-ignore-patterns?

Configuration file example ts-prunerc:

{
  "ignore": "my-component-ignore-patterns?"
}

FAQ

How do I get the count of unused exports?

ts-prune | wc -l

How do I ignore a specific path?

ts-prune | grep -v src/ignore-this-path

How do I ignore a specific identifier?

You can either,

1. Prefix the export with // ts-prune-ignore-next
// ts-prune-ignore-next
export const thisNeedsIgnoring = foo;
2. Use grep -v to ignore a more widely used export name
ts-prune | grep -v ignoreThisThroughoutMyCodebase

Acknowledgements

Licence

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].