# @becklyn/typescript-error-formatter

> Error formatter for typescript errors

Latest version **1.0.4** (published 2019-05-22) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @becklyn/typescript-error-formatter
pnpm add @becklyn/typescript-error-formatter
yarn add @becklyn/typescript-error-formatter
bun add @becklyn/typescript-error-formatter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2019-05-22 |
| First published | 2018-02-28 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | apfelbox, keichinger |

## Links

- npm: https://www.npmjs.com/package/@becklyn/typescript-error-formatter
- Repository: https://github.com/Becklyn/typescript-error-formatter
- Issues: https://github.com/Becklyn/typescript-error-formatter/issues
- npm.io page: https://npm.io/package/@becklyn/typescript-error-formatter

## Recent versions

- 1.0.4 (latest) — 2019-05-22
- 1.0.3 — 2019-05-22
- 1.0.2 — 2018-08-09
- 1.0.1 — 2018-03-25
- 1.0.0 — 2018-02-28

## README

TypeScript Error Formatter
==========================

Installation
------------


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


Usage
-----

Add the formatter in your `ts-loader` config:


```js
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](docs/screenshot.png)

---
_Source: https://npm.io/package/@becklyn/typescript-error-formatter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
