🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@k88/typescript-compile-error-formatter

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@k88/typescript-compile-error-formatter

Formats Typescript error messages from Fork TS Checker Webpack Plugin

2.1.0
latest
Source
npm
Version published
Weekly downloads
5.1K
7.83%
Maintainers
1
Weekly downloads
 
Created
Source

@k88/typescript-compile-error-formatter

A error formatter for typescript compile errors, taken from react-dev-utils, but is published as a standalone module and has Typescript definition.

Installation

This formatter best works with the output of fork-ts-checker-webpack-plugin and is used as a peer dependency. Install both using:

npm install @k88/typescript-compile-error-formatter fork-ts-checker-webpack-plugin --save-dev

Usage

Use it for a formatted error message form fork-ts-checker-webpack-plugin:

import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import typescriptFormatter from '@k88/typescript-compile-error-formatter';

forkTsCheckerWebpackPlugin
    .getCompilerHooks(compiler)
    .receive.tap('afterTypeScriptCheck', (diagnostics, lints) => {
        [...diagnostics, ...lints].forEach(msg, => typescriptFormatter(msg, true));
      });

Keywords

fork-ts-checker-webpack-plugin

FAQs

Package last updated on 12 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts