mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Add support for authoring custom rules.
This commit is contained in:
parent
f24f98e146
commit
802c81f929
6 changed files with 375 additions and 97 deletions
18
test/rules/first-line.js
Normal file
18
test/rules/first-line.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// @ts-check
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"names": [ "first-line" ],
|
||||
"description": "Rule that reports an error for the first line",
|
||||
"tags": [ "test" ],
|
||||
"function": function rule(params, onError) {
|
||||
// Unconditionally report an error for line 1
|
||||
onError({
|
||||
"lineNumber": 1,
|
||||
"detail": null,
|
||||
"context": null,
|
||||
"range": null
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue