From 4452ddc325e2ad90af93e5e7cadd76d91949de33 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Mon, 20 Dec 2021 10:58:44 +0100 Subject: [PATCH] Add message `url` Closes GH-5. Reviewed-by: Christian Murphy Reviewed-by: Titus Wormer --- index.js | 3 ++- package.json | 2 +- test.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index db429b7..a893606 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,7 @@ import {quotation} from 'quotation' import {schema} from './schema.js' const source = 'retext-diacritics' +const url = 'https://github.com/retext/retext-diacritics#readme' const list = Object.keys(schema) @@ -33,7 +34,7 @@ export default function retextDiacritics() { {start: pointStart(match[0]), end: pointEnd(match[match.length - 1])}, [source, phrase.replace(/\s+/g, '-').toLowerCase()].join(':') ), - {actual, expected: [expected]} + {actual, expected: [expected], url} ) }) } diff --git a/package.json b/package.json index 5f7bb3a..c6a6069 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "rimraf": "^3.0.0", "tape": "^5.0.0", "type-coverage": "^2.0.0", - "typescript": "^4.0.0", + "typescript": "~4.4.0", "unist-builder": "^3.0.0", "xo": "^0.44.0" }, diff --git a/test.js b/test.js index 8dfeef2..b0f6317 100644 --- a/test.js +++ b/test.js @@ -25,7 +25,8 @@ test('retext-diacritics', (t) => { }, fatal: false, actual: 'Beyonce', - expected: ['Beyoncé'] + expected: ['Beyoncé'], + url: 'https://github.com/retext/retext-diacritics#readme' }, 'should emit a message' )