https://github.com/becklyn/typescript-error-formatter
Error formatter for typescript errors
https://github.com/becklyn/typescript-error-formatter
Last synced: about 1 month ago
JSON representation
Error formatter for typescript errors
- Host: GitHub
- URL: https://github.com/becklyn/typescript-error-formatter
- Owner: Becklyn
- License: bsd-3-clause
- Created: 2018-02-28T08:45:15.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-22T13:07:51.000Z (about 6 years ago)
- Last Synced: 2024-10-16T11:03:47.435Z (7 months ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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:
