mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
Add rule name and file/string identifier to Error message thrown by onError validation for rules.
This commit is contained in:
parent
74f4163a10
commit
d2faf40e6a
3 changed files with 16 additions and 8 deletions
|
|
@ -2354,7 +2354,8 @@ function lintContent(ruleList, aliasToRuleNames, name, content, md, config, conf
|
|||
});
|
||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||
function throwError(property) {
|
||||
throw new Error("Property '" + property + "' of onError parameter is incorrect.");
|
||||
throw new Error( // eslint-disable-next-line max-len
|
||||
"Value of '".concat(property, "' passed to onError by '").concat(ruleName, "' is incorrect for '").concat(name, "'."));
|
||||
}
|
||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||
function onError(errorInfo) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue