Add optional "information" property to custom rules to provide a link to more information.

This commit is contained in:
David Anson 2019-01-15 21:56:38 -08:00
parent b77dd5ccd3
commit ff86e1d7f1
14 changed files with 201 additions and 6 deletions

View file

@ -2,9 +2,15 @@
"use strict";
const { URL } = require("url");
module.exports = {
"names": [ "any-blockquote" ],
"description": "Rule that reports an error for any blockquote",
"information": new URL(
"https://github.com/DavidAnson/markdownlint" +
"/blob/master/test/rules/any-blockquote.js"
),
"tags": [ "test" ],
"function": function rule(params, onError) {
params.tokens.filter(function filterToken(token) {

View file

@ -2,9 +2,15 @@
"use strict";
const { URL } = require("url");
module.exports = {
"names": [ "letters-E-X", "letter-E-letter-X", "contains-ex" ],
"description": "Rule that reports an error for lines with the letters 'EX'",
"information": new URL(
"https://github.com/DavidAnson/markdownlint" +
"/blob/master/test/rules/letters-E-X.js"
),
"tags": [ "test" ],
"function": function rule(params, onError) {
params.tokens.filter(function filterToken(token) {