mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #295] [Feature request] add markdownlint-disable-next-line #2100
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#2100
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 @Mister-Hope on GitHub (Jun 6, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/295
Currently, we can do this:
But I think a support for this is better(just like eslint):
Why do we need it?
We can easily copy
<!-- markdownlint-disable-next-line xxx -->and paste it across markdown files, while we can not do it using the first one.E.G.:
I do not want MD040 when writing like below:
A situation like this can be triggered several times in different pages, so I would like to diable them more conviniently.
@Mister-Hope commented on GitHub (Oct 6, 2020):
Any progress on this issue? I really think it's a good enhancement
@DavidAnson commented on GitHub (Oct 6, 2020):
No progress, but probably for the next release.
@Mister-Hope commented on GitHub (Nov 28, 2020):
I think we might need to improve it.
Some parser a new line between comment and the next line.
For example, prettier requires an empty new line between HTML comment and the next line.
I think the methods should be:
-disable-enableor-disable-next-ast( May be support by other linters day after) go to the next oneAnd if users do want two or more empty line, they should write:
Also, in this case
next-linewould be misleading, something likenext-astwould be better.@DavidAnson commented on GitHub (Nov 28, 2020):
next-lineis clear, easy to understand, consistent with other tools like ESLint, and it works with CommonMark which is the specification I use for resolving ambiguities. I'd like to stay with this implementation and see how it works for people. Scenarios like what you describe can always be handled bydisable/enable.