mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Allow a custom rule's onError implementation to override that rule's information URL for each error.
This commit is contained in:
parent
14974e52a9
commit
c699b8e22b
7 changed files with 235 additions and 18 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue