Skip to content

Commit

Permalink
Change default reporter to vfile-reporter-shiny
Browse files Browse the repository at this point in the history
Closes #83.
  • Loading branch information
vweevers committed Nov 14, 2021
1 parent e8ec0c8 commit 1294b85
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ Markdown is then checked automatically when you run `npm test`:

```
$ npm test
README.md
75:27-75:42 warning Found reference to undefined definition no-undefined-references remark-lint
README.md:5:3
⚠️ 5:3 Found reference to undefined definition remark-lint:no-undefined-references
1 warning
1 warning
```

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

## Reporters

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

- [`vfile-reporter`](https://npmjs.org/package/vfile-reporter) (default)
- [`vfile-reporter`](https://npmjs.org/package/vfile-reporter)
- [`vfile-reporter-json`](https://npmjs.org/package/vfile-reporter-json)
- [`vfile-reporter-pretty`](https://npmjs.org/package/vfile-reporter-pretty)

Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ function hallmark (options, callback) {
reporterOptions = reporter
reporter = reporter._[0]
}
} else {
reporter = require('vfile-reporter-shiny')
}

const paddedTable = rc.paddedTable !== false
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
"remote-origin-url": "^2.0.0",
"subarg": "^1.0.0",
"supports-color": "^7.1.0",
"unified-engine": "^8.0.0"
"unified-engine": "^8.0.0",
"vfile-reporter-shiny": "^0.1.2"
},
"devDependencies": {
"depcheck": "^1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ test('lints various', function (t) {
t.same(file.messages.map(String), [
'test.md:5:3-5:6: Found reference to undefined definition',
'test.md:6:3-6:21: Don’t use literal URLs without angle brackets',
'test.md:16:1-16:9: Code blocks should be fenced', // TODO: sort messages by line
'test.md:12:23: Cell should be padded',
'test.md:16:1-16:9: Code blocks should be fenced',
'test.md:28:4-28:5: Checked checkboxes should use `x` as a marker'
])
t.end()
Expand Down

0 comments on commit 1294b85

Please sign in to comment.