diff --git a/README.md b/README.md index ee24475..a63c290 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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) diff --git a/index.js b/index.js index 33fb055..32d978b 100644 --- a/index.js +++ b/index.js @@ -40,6 +40,8 @@ function hallmark (options, callback) { reporterOptions = reporter reporter = reporter._[0] } + } else { + reporter = require('vfile-reporter-shiny') } const paddedTable = rc.paddedTable !== false diff --git a/package.json b/package.json index 4b7b266..2db1a8c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/api.js b/test/api.js index 259c2da..77a3e2c 100644 --- a/test/api.js +++ b/test/api.js @@ -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()