mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Remove MD002 (deprecated in v0.13.0) and MD006 (deprecated in v0.19.0).
This commit is contained in:
parent
80539b774e
commit
20a552b4b7
40 changed files with 250 additions and 1239 deletions
|
|
@ -2,5 +2,4 @@
|
|||
|
||||
This document contains a description of all rules, what they are checking for,
|
||||
as well as examples of documents that break the rule and corrected
|
||||
versions of the examples. Any rule whose heading is ~~struck through~~ is
|
||||
deprecated, but still provided for backward-compatibility.
|
||||
versions of the examples.
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
> Note: *MD002 has been deprecated and is disabled by default.*
|
||||
> [MD041/first-line-heading](md041.md) offers an improved implementation.
|
||||
|
||||
This rule is intended to ensure document headings start at the top level and
|
||||
is triggered when the first heading in the document isn't an h1 heading:
|
||||
|
||||
```markdown
|
||||
## This isn't an H1 heading
|
||||
|
||||
### Another heading
|
||||
```
|
||||
|
||||
The first heading in the document should be an h1 heading:
|
||||
|
||||
```markdown
|
||||
# Start with an H1 heading
|
||||
|
||||
## Then use an H2 for subsections
|
||||
```
|
||||
|
||||
Note: The `level` parameter can be used to change the top-level (ex: to h2) in
|
||||
cases where an h1 is added externally.
|
||||
|
||||
Rationale: The top-level heading often acts as the title of a document. More
|
||||
information: <https://cirosantilli.com/markdown-style-guide#top-level-header>.
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
This rule is triggered when top-level lists don't start at the beginning of a
|
||||
line:
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
|
||||
* List item
|
||||
* List item
|
||||
```
|
||||
|
||||
To fix, ensure that top-level list items are not indented:
|
||||
|
||||
```markdown
|
||||
Some test
|
||||
|
||||
* List item
|
||||
* List item
|
||||
```
|
||||
|
||||
Note: This rule is triggered for the following scenario because the unordered
|
||||
sublist is not recognized as such by the parser. Not being nested 3 characters
|
||||
as required by the outer ordered list, it creates a top-level unordered list
|
||||
instead.
|
||||
|
||||
```markdown
|
||||
1. List item
|
||||
- List item
|
||||
- List item
|
||||
1. List item
|
||||
```
|
||||
|
||||
Rationale: Starting lists at the beginning of the line means that nested list
|
||||
items can all be indented by the same amount when an editor's indent function
|
||||
or the tab key is used to indent. Starting a list 1 space in means that the
|
||||
indent of the first nested list is less than the indent of the second level (3
|
||||
characters if you use 4 space tabs, or 1 character if you use 2 space tabs).
|
||||
|
|
@ -20,10 +20,9 @@ unordered (otherwise, extra indentation of ordered lists interferes with the
|
|||
rule).
|
||||
|
||||
The `start_indented` parameter allows the first level of lists to be indented by
|
||||
the configured number of spaces rather than starting at zero (the inverse of
|
||||
MD006). The `start_indent` parameter allows the first level of lists to be
|
||||
indented by a different number of spaces than the rest (ignored when
|
||||
`start_indented` is not set).
|
||||
the configured number of spaces rather than starting at zero. The `start_indent`
|
||||
parameter allows the first level of lists to be indented by a different number
|
||||
of spaces than the rest (ignored when `start_indented` is not set).
|
||||
|
||||
Rationale: Indenting by 2 spaces allows the content of a nested list to be in
|
||||
line with the start of the content of the parent list when a single space is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue