@becklyn/typescript-error-formatter

1.0.4 • Public • Published

TypeScript Error Formatter

Installation

yarn add -D @becklyn/typescript-error-formatter

Usage

Add the formatter in your ts-loader config:

const formatter = require("@becklyn/typescript-error-formatter"); 

const config = {
    module: {
        rules: [
            {
                test: /\.tsx?$/,
                use: [
                    babelLoader,
                    {
                        loader: "ts-loader",
                        options: {
                            // ↓ ↓ ↓
                            errorFormatter: (message, colors) => formatter(message, colors, process.cwd()),
                            // ↑ ↑ ↑
                        },
                    },
                ],
            },
        ],
    },
};

Design

The design is inspired by Flow:

Screenshot of the design

Readme

Keywords

none

Package Sidebar

Install

npm i @becklyn/typescript-error-formatter

Weekly Downloads

40

Version

1.0.4

License

BSD-3-Clause

Unpacked Size

4.68 kB

Total Files

4

Last publish

Collaborators

  • jj_becklyn
  • mangoischke
  • marc_hessenauer
  • msc-at-becklyn
  • hautzi
  • dsmoosh-becklyn
  • timfuhrmann
  • jesko-plitt
  • msvujnovic-becklyn