Update MD024/no-duplicate-heading to allow non-sibling duplicates (fixes #136).

This commit is contained in:
David Anson 2018-07-19 21:49:30 -07:00
parent 4865301ce9
commit d76ede1c4f
10 changed files with 246 additions and 15 deletions

View file

@ -25,6 +25,7 @@ const schema = {
const tags = {};
// Add rules
// eslint-disable-next-line complexity
rules.forEach(function forRule(rule) {
rule.tags.forEach(function forTag(tag) {
const tagRules = tags[tag] || [];
@ -151,6 +152,20 @@ rules.forEach(function forRule(rule) {
}
};
break;
case "MD024":
scheme.properties = {
"allow_different_nesting": {
"description": "Only check sibling headings",
"type": "boolean",
"default": false
},
"siblings_only": {
"description": "Only check sibling headings",
"type": "boolean",
"default": false
}
};
break;
case "MD026":
case "MD036":
scheme.properties = {