mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Harden code to snapshot rule definitions against mutation, add comments to some helper functions.
This commit is contained in:
parent
8fe7c109ed
commit
9897863130
4 changed files with 154 additions and 36 deletions
|
|
@ -490,9 +490,9 @@ test("customRulesDefinitionStatic", (t) => new Promise((resolve) => {
|
|||
"tags": [ "tag" ],
|
||||
"function": (params, onError) => {
|
||||
const definition = options.customRules[0];
|
||||
definition.names = [ "changed" ];
|
||||
definition.names[0] = "changed";
|
||||
definition.description = "changed";
|
||||
definition.information = new URL("https://example.com/changed");
|
||||
definition.information.pathname = "changed";
|
||||
onError({
|
||||
"lineNumber": 1
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue