mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #32] Require structure only for certain files / paths #1872
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#1872
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 @pascalberger on GitHub (Nov 16, 2016).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/32
Is there a way to have MD043 only required for certain files or paths, but not for others?
Or is there a way to exclude this rule for certain files?
I tried with
<!-- markdownlint-disable MD043 -->but couldn't get it working.@DavidAnson commented on GitHub (Nov 17, 2016):
Customizing the config object for
MD043for each file is one approach. Another is turningMD043off via a comment as you show above. To verify this, I changedexample/good.mdto:And
example/standalone.jsto:At this point, the output is:
Updating
good.mdto disableMD043with an inline comment looks like:And, indeed, suppresses the
MD043warning above.Could you please double-check your configuration? Or tell me how to reproduce the problem?
Thanks!
@pascalberger commented on GitHub (Nov 17, 2016):
Thanks, I got it working by suppressing
MD043with a comment (but which needed at the end of the document, otherwise it would raise an MD041 issue).