7
7
[ ![ Backers] [ backers-badge ]] [ collective ]
8
8
[ ![ Chat] [ chat-badge ]] [ chat ]
9
9
10
- [ vfile] [ ] utility to create a report from a file .
10
+ [ vfile] [ ] utility to create a report.
11
11
12
12
![ Example screenshot of vfile-reporter] [ screenshot ]
13
13
@@ -38,6 +38,9 @@ bundlers (such as esbuild), have similar functionality.
38
38
You can use this package whenever you want to display a report about what
39
39
occurred while processing to a human.
40
40
41
+ There are [ other reporters] [ reporters ] that display information differently
42
+ listed in vfile.
43
+
41
44
## Install
42
45
43
46
This package is [ ESM only] [ esm ] .
@@ -63,7 +66,7 @@ In browsers with [`esm.sh`][esmsh]:
63
66
64
67
## Use
65
68
66
- Say ` example.js ` contains :
69
+ Say our module ` example.js ` looks as follows :
67
70
68
71
``` js
69
72
import {VFile } from ' vfile'
@@ -77,7 +80,7 @@ one.message('Warning!', {line: 2, column: 4})
77
80
console .error (reporter ([one, two]))
78
81
```
79
82
80
- Now, running ` node example ` yields:
83
+ …now running ` node example.js ` yields:
81
84
82
85
``` txt
83
86
test/fixture/1.js
@@ -95,7 +98,7 @@ That value is also the default export.
95
98
96
99
### ` reporter(files[, options]) `
97
100
98
- Create a report from an error, on file, or multiple files.
101
+ Create a report from an error, one file, or multiple files.
99
102
100
103
##### ` options `
101
104
@@ -104,7 +107,8 @@ Configuration (optional).
104
107
###### ` options.color `
105
108
106
109
Use ANSI colors in report (` boolean ` , default: depends).
107
- The default behavior is the check if [ color is supported] [ supports-color ] .
110
+ The default behavior in Node.js is the check if [ color is
111
+ supported] [ supports-color ] .
108
112
109
113
###### ` options.verbose `
110
114
@@ -128,7 +132,7 @@ If one file and no `defaultName` is given, no name will show up in the report.
128
132
129
133
##### Returns
130
134
131
- ` string ` .
135
+ Report ( ` string ` ) .
132
136
133
137
## Types
134
138
@@ -139,7 +143,7 @@ It exports the additional type `Options`.
139
143
140
144
Projects maintained by the unified collective are compatible with all maintained
141
145
versions of Node.js.
142
- As of now, that is Node.js 12.20+, 14.14+, and 16 .0+.
146
+ As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18 .0+.
143
147
Our projects sometimes work with older versions, but this is not guaranteed.
144
148
145
149
## Security
@@ -171,7 +175,7 @@ abide by its terms.
171
175
172
176
[ MIT] [ license ] © [ Titus Wormer] [ author ]
173
177
174
- Forked from [ ESLint] [ ] ’ s stylish reporter
178
+ Forked from [ ESLint] [ ] s stylish reporter
175
179
(originally created by Sindre Sorhus), which is Copyright (c) 2013
176
180
Nicholas C. Zakas, and licensed under MIT.
177
181
@@ -223,8 +227,10 @@ Nicholas C. Zakas, and licensed under MIT.
223
227
224
228
[ vfile ] : https://github.com/vfile/vfile
225
229
226
- [ screenshot ] : ./screenshot.png
230
+ [ reporters ] : https://github.com/vfile/vfile#reporters
227
231
228
232
[ supports-color ] : https://github.com/chalk/supports-color
229
233
230
234
[ message-note ] : https://github.com/vfile/vfile-message#note
235
+
236
+ [ screenshot ] : screenshot.png
0 commit comments