mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +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
|
|
@ -604,7 +604,8 @@ function lintContent(
|
|||
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||
function throwError(property) {
|
||||
throw new Error(
|
||||
"Property '" + property + "' of onError parameter is incorrect.");
|
||||
// eslint-disable-next-line max-len
|
||||
`Value of '${property}' passed to onError by '${ruleName}' is incorrect for '${name}'.`);
|
||||
}
|
||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||
function onError(errorInfo) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue