Skip to content

Commit 1294b85

Browse files
committed
Change default reporter to vfile-reporter-shiny
Closes #83.
1 parent e8ec0c8 commit 1294b85

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ Markdown is then checked automatically when you run `npm test`:
9090

9191
```
9292
$ npm test
93-
README.md
94-
75:27-75:42 warning Found reference to undefined definition no-undefined-references remark-lint
93+
README.md:5:3
94+
⚠️ 5:3 Found reference to undefined definition remark-lint:no-undefined-references
9595
96-
1 warning
96+
1 warning
9797
```
9898

9999
## Requirements
@@ -252,9 +252,9 @@ Running `hallmark fix` will then create or update a table of contents.
252252

253253
## Reporters
254254

255-
Various reporters are available:
255+
The default reporter is [`vfile-reporter-shiny`](https://github.com/vweevers/vfile-reporter-shiny). Various other reporters are available:
256256

257-
- [`vfile-reporter`](https://npmjs.org/package/vfile-reporter) (default)
257+
- [`vfile-reporter`](https://npmjs.org/package/vfile-reporter)
258258
- [`vfile-reporter-json`](https://npmjs.org/package/vfile-reporter-json)
259259
- [`vfile-reporter-pretty`](https://npmjs.org/package/vfile-reporter-pretty)
260260

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ function hallmark (options, callback) {
4040
reporterOptions = reporter
4141
reporter = reporter._[0]
4242
}
43+
} else {
44+
reporter = require('vfile-reporter-shiny')
4345
}
4446

4547
const paddedTable = rc.paddedTable !== false

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"remote-origin-url": "^2.0.0",
5454
"subarg": "^1.0.0",
5555
"supports-color": "^7.1.0",
56-
"unified-engine": "^8.0.0"
56+
"unified-engine": "^8.0.0",
57+
"vfile-reporter-shiny": "^0.1.2"
5758
},
5859
"devDependencies": {
5960
"depcheck": "^1.2.0",

test/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ test('lints various', function (t) {
1414
t.same(file.messages.map(String), [
1515
'test.md:5:3-5:6: Found reference to undefined definition',
1616
'test.md:6:3-6:21: Don’t use literal URLs without angle brackets',
17-
'test.md:16:1-16:9: Code blocks should be fenced', // TODO: sort messages by line
1817
'test.md:12:23: Cell should be padded',
18+
'test.md:16:1-16:9: Code blocks should be fenced',
1919
'test.md:28:4-28:5: Checked checkboxes should use `x` as a marker'
2020
])
2121
t.end()

0 commit comments

Comments
 (0)