Namibian Pyjama Merchant

    @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

    Keywords

    none

    Install

    npm i @becklyn/typescript-error-formatter

    DownloadsWeekly Downloads

    393

    Version

    1.0.4

    License

    BSD-3-Clause

    Unpacked Size

    4.68 kB

    Total Files

    4

    Last publish

    Collaborators

    • timfuhrmann
    • keichinger
    • jesko-plitt
    • msvujnovic-becklyn