Socket
Socket
Sign inDemoInstall

@k88/typescript-compile-error-formatter

Package Overview
Dependencies
140
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

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


Version published
Maintainers
1
Install size
300 kB
Created

Readme

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

FAQs

Last updated on 12 Aug 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc