mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
18 lines
421 B
JavaScript
18 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"
|
|
});
|
|
}
|
|
}
|
|
};
|