mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #1601] no-duplicate-heading: Enable siblings_only by default? #716
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#716
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JoshuaKGoldberg on GitHub (May 12, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1601
MD024 / no-duplicate-heading includes a
siblings_onlyproperty:github.com/DavidAnson/markdownlint@224987d727/doc/Rules.md (L806)Is there a reason this is on by default? Duplicate non-sibling headings are not necessarily an issue. For common terms like
## API->### (feature)->#### Examples, it can sometimes make more sense to be consistent with headings across sections.Example resource discussing how non-sibling duplicates are not necessarily an accessibility issue: https://www.tpgi.com/heading-off-confusion-when-do-headings-fail-wcag
Related issues: #300, #1591
Related comment in the wild: https://github.com/JoshuaKGoldberg/package-json-validator/pull/230#discussion_r2085067204
@DavidAnson commented on GitHub (May 12, 2025):
That setting did not used to exist and was added in response to the changelog pattern you cite. Because the rule is ultimately about not duplicating headings, the default behavior is to not duplicate ANY headings. For people in the nested scenario, they can opt in.
@JoshuaKGoldberg commented on GitHub (May 12, 2025):
Can I ask, why? 🙂
As in, what is the set of reasons to enable the rule - and which of those reasons still apply to non-siblings?
@DavidAnson commented on GitHub (May 12, 2025):
Quoting the documentation:
I can't say which parsers, or whether they still have this problem.