Allow a custom rule's onError implementation to override that rule's information URL for each error.

This commit is contained in:
David Anson 2023-07-11 21:44:45 -07:00
parent 14974e52a9
commit c699b8e22b
7 changed files with 235 additions and 18 deletions

View file

@ -112,7 +112,7 @@ markdownlint(options, assertLintResultsCallback);
const testRule = {
"names": [ "test-rule" ],
"description": "Test rule",
"information": new URL("https://example.com/test-rule"),
"information": new URL("https://example.com/rule-information"),
"tags": [ "test-tag" ],
"function": function rule(params: markdownlint.RuleParams, onError: markdownlint.RuleOnError) {
assert(!!params);
@ -136,6 +136,7 @@ const testRule = {
"lineNumber": 1,
"detail": "detail",
"context": "context",
"information": new URL("https://example.com/error-information"),
"range": [ 1, 2 ],
"fixInfo": {
"lineNumber": 1,