1. @fezvrasta/tsc-silent
tsc with --supress
@fezvrasta/tsc-silent
Package: @fezvrasta/tsc-silent
Created by: evolution-gaming
Last modified: Tue, 05 Apr 2022 10:35:43 GMT
Version: 1.3.4
License: MIT
Downloads: 70
Repository: https://github.com/evolution-gaming/tsc-silent

Install

npm install @fezvrasta/tsc-silent
yarn add @fezvrasta/tsc-silent

tsc-silent

The purpose of the wrapper is to execute TypeScript compiler but suppress some error messages
coming from certain files/folders. For example, this can be used to enable noImplicitAny in
some parts of the project while keeping it disabled in others.

Installing

 npm install -g tsc-silent

Usage

tsc-silent --project <path> [--suppress config | --suppressConfig path] [--compiler path] [--watch]

Synopsis

--project, -p    Path to tsconfig.json

--compiler       Path to typescript.js.
                 By default, uses `./node_modules/typescript/lib/typescript.js`.

--suppress       Suppressed erros.
                 E.g. `--suppress 7017@src/js/ 2322,2339,2344@/src/legacy/`.

--suppressConfig Path to supressed errors config.
                 See documentation for examples.

--watch, -w      Run in watch mode.

--stats          Print number of suppressed errors per path and error code.

Suppress config

You have to pass either --suppress or --suppressConfig.

--suppress

Let's ignore error 7017 in src/js/ directory and errors 2322, 2339, 2344 in /src/legacy/:

 tsc-silent -p tsconfig.json --suppress 7017@/src/js/ 2322,2339,2344@/src/legacy/

or, ignore all errors in /src/legacy/ folder

 tsc-silent -p tsconfig.json --suppress @/src/legacy/

or, completely ignore all errors

 tsc-silent -p tsconfig.json --suppress @

--suppressConfig

 tsc-silent -p tsconfig.json --suppressConfig tsc-silent.config.js

See example.config.js.

Intended/typical use

Check out the article to see the intended use.

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code