From d5a6820eb1191fe832bcc9948bd80bc61aee95ee Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Mon, 20 Dec 2021 10:58:29 +0100 Subject: [PATCH] Add message `url` Closes GH-8. 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 ac0db15..76d7078 100644 --- a/index.js +++ b/index.js @@ -19,6 +19,7 @@ import {list} from './list.js' // Rules. const source = 'retext-contractions' +const url = 'https://github.com/retextjs/retext-contractions#readme' const own = {}.hasOwnProperty @@ -78,7 +79,7 @@ export default function retextContractions(options = {}) { (straight ? 'straight-apostrophe' : 'smart-apostrophe') ].join(':') ), - {actual, expected: [expected]} + {actual, expected: [expected], url} ) } }) diff --git a/package.json b/package.json index d0d616c..ad3c6cc 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "rimraf": "^3.0.0", "tape": "^5.0.0", "type-coverage": "^2.0.0", - "typescript": "^4.0.0", + "typescript": "~4.4.0", "xo": "^0.44.0" }, "scripts": { diff --git a/test.js b/test.js index f1ca3b5..8231ac7 100644 --- a/test.js +++ b/test.js @@ -24,7 +24,8 @@ test('retext-contractions', (t) => { }, fatal: false, actual: 'Yall', - expected: ['Y’all'] + expected: ['Y’all'], + url: 'https://github.com/retextjs/retext-contractions#readme' } ], 'should message for missing smart apostrophes'