mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
19 lines
421 B
JavaScript
19 lines
421 B
JavaScript
![]() |
// @ts-check
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
module.exports = {
|
||
|
"names": [ "sample-rule-commonjs" ],
|
||
|
"description": "Sample rule (commonjs)",
|
||
|
"tags": [ "sample" ],
|
||
|
"function": (params, onError) => {
|
||
|
const hrTokens = params.tokens.filter((token) => token.type === "hr");
|
||
|
for (const token of hrTokens) {
|
||
|
onError({
|
||
|
"lineNumber": token.lineNumber,
|
||
|
"detail": "Sample error for hr"
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
};
|