Skip to content

Commit

Permalink
.markdownlint: disable "no trailing spaces" rule (#2048)
Browse files Browse the repository at this point in the history
  • Loading branch information
yikeke authored Mar 18, 2020
1 parent 5832851 commit bc4a3fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ heading-style:
style: atx

# MD009
no-trailing-spaces: true
# no-trailing-spaces: true

# MD010
no-hard-tabs: true
Expand Down
31 changes: 15 additions & 16 deletions resources/markdownlint-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can also run a local markdownlint check:
./scripts/markdownlint [FILE...]
```

👇The following table shows the 26 [markdownlint rules](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md) that we set in advance for TiDB documentation, along with straightforward explanations. 🤓A quick glance at the table, and you can surely grasp the basics of our Markdown rules.
👇The following table shows the 25 [markdownlint rules](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md) that we set in advance for TiDB documentation, along with straightforward explanations. 🤓A quick glance at the table, and you can surely grasp the basics of our Markdown rules.

| NO. | Rules | Descriptions |
| :--- | :--- | :--- |
Expand All @@ -27,18 +27,17 @@ You can also run a local markdownlint check:
| 9 | [MD025 - Multiple top level headings in the same document](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md025---multiple-top-level-headings-in-the-same-document) | Only one top level heading is allowed in each document. The metadata before the top level heading, which specifies `title` and `category`, does not violate this rule. |
| 10 | [MD041 - First line in file should be a top level heading](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md041---first-line-in-file-should-be-a-top-level-heading) | The first line in file should be a top level heading. The CI check ignores the metadata in the first few lines of the file and examines if a top level heading comes after the metadata. |
| 11 | [MD007 - Unordered list indentation](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md007---unordered-list-indentation) | In general, list items are indented by 4 spaces in all the `.md` files. The only exception is the `TOC.md` file, in which list items are indented by 2 spaces. |
| 12 | [MD009 - Trailing spaces](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md009---trailing-spaces) | Trailing spaces are not allowed at the end of lines. |
| 13 | [MD010 - Hard tabs](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md010---hard-tabs) | **Hard tab characters** are not allowed in the documents, including in code blocks. If you need to indent, please use **spaces** instead. |
| 14 | [MD012 - Multiple consecutive blank lines](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md012---multiple-consecutive-blank-lines) | Multiple consecutive blank lines are not allowed. |
| 15 | [MD027 - Multiple spaces after blockquote symbol](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md027---multiple-spaces-after-blockquote-symbol) | Multiple spaces after the blockquote symbol `>` are not allowed. Only **one** space can be used, followed by the quote content. |
| 16 | [MD029 - Ordered list item prefix](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md029---ordered-list-item-prefix) | When you use an ordered list, the item prefix must begin with `1.` and increase in numerical order. |
| 17 | [MD030 - Spaces after list markers](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md030---spaces-after-list-markers) | When you use a list, only **one space** is added between the list marker (`+`, `-`, `*` or numbers) and the text of the list item. |
| 18 | [MD032 - Lists should be surrounded by blank lines](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md032---lists-should-be-surrounded-by-blank-lines) | Lists (of any kind) must have a blank line both before and after. |
| 19 | [MD031 - Fenced code blocks should be surrounded by blank lines](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md031---fenced-code-blocks-should-be-surrounded-by-blank-lines) | Code blocks must have a blank line both before and after.|
| 20 | [MD034 - Bare URL used](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md034---bare-url-used) | Bare URL is not allowed in the documents. If you want users to directly click and open that URL, add a pair of angle brackets around the URL (`<URL>`). If you have to use a bare URL under special circumstances, and you do not require users to click and open it, add a pair of backticks around the URL (`` `URL` ``). |
| 21 | [MD037 - Spaces inside emphasis markers](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md037---spaces-inside-emphasis-markers) | When emphasis markers (bold, italic) are used, extra spaces are not allowed inside the emphasis markers. For example, `** bold text **` is not allowed. |
| 22 | [MD038 - Spaces inside code span elements](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md038---spaces-inside-code-span-elements) | When backticks are used to enclose code span elements, extra spaces are not allowed in the code span. For example, `` ` example text ` `` is not allowed. |
| 23 | [MD039 - Spaces inside link text](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md039---spaces-inside-link-text) | Extra spaces are not allowed on both sides of the link text. For example, `[ a link ](https://www.example.com/)` is not allowed. |
| 24 | [MD042 - No empty links](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md042---no-empty-links) | Links must have a destination. For example, `[empty link 1]()` and `[empty link 2](#)` are not allowed. |
| 25 | [MD045 - Images should have alternate text (alt text)](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md045---images-should-have-alternate-text-alt-text) | Images should have alternate text (alt text). Alt text is written in `[]` of `![]()`. It describes the image for people who fails to load the image. |
| 26 | [MD046 - Code block style](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md046---code-block-style) | Use **three backticks** ` ``` ` to enclose code blocks in the documents. Do **not** use **four-space indentation** to indicate code blocks. |
| 12 | [MD010 - Hard tabs](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md010---hard-tabs) | **Hard tab characters** are not allowed in the documents, including in code blocks. If you need to indent, please use **spaces** instead. |
| 13 | [MD012 - Multiple consecutive blank lines](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md012---multiple-consecutive-blank-lines) | Multiple consecutive blank lines are not allowed. |
| 14 | [MD027 - Multiple spaces after blockquote symbol](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md027---multiple-spaces-after-blockquote-symbol) | Multiple spaces after the blockquote symbol `>` are not allowed. Only **one** space can be used, followed by the quote content. |
| 15 | [MD029 - Ordered list item prefix](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md029---ordered-list-item-prefix) | When you use an ordered list, the item prefix must begin with `1.` and increase in numerical order. |
| 16 | [MD030 - Spaces after list markers](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md030---spaces-after-list-markers) | When you use a list, only **one space** is added between the list marker (`+`, `-`, `*` or numbers) and the text of the list item. |
| 17 | [MD032 - Lists should be surrounded by blank lines](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md032---lists-should-be-surrounded-by-blank-lines) | Lists (of any kind) must have a blank line both before and after. |
| 18 | [MD031 - Fenced code blocks should be surrounded by blank lines](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md031---fenced-code-blocks-should-be-surrounded-by-blank-lines) | Code blocks must have a blank line both before and after.|
| 19 | [MD034 - Bare URL used](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md034---bare-url-used) | Bare URL is not allowed in the documents. If you want users to directly click and open that URL, add a pair of angle brackets around the URL (`<URL>`). If you have to use a bare URL under special circumstances, and you do not require users to click and open it, add a pair of backticks around the URL (`` `URL` ``). |
| 20 | [MD037 - Spaces inside emphasis markers](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md037---spaces-inside-emphasis-markers) | When emphasis markers (bold, italic) are used, extra spaces are not allowed inside the emphasis markers. For example, `** bold text **` is not allowed. |
| 21 | [MD038 - Spaces inside code span elements](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md038---spaces-inside-code-span-elements) | When backticks are used to enclose code span elements, extra spaces are not allowed in the code span. For example, `` ` example text ` `` is not allowed. |
| 22 | [MD039 - Spaces inside link text](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md039---spaces-inside-link-text) | Extra spaces are not allowed on both sides of the link text. For example, `[ a link ](https://www.example.com/)` is not allowed. |
| 23 | [MD042 - No empty links](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md042---no-empty-links) | Links must have a destination. For example, `[empty link 1]()` and `[empty link 2](#)` are not allowed. |
| 24 | [MD045 - Images should have alternate text (alt text)](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md045---images-should-have-alternate-text-alt-text) | Images should have alternate text (alt text). Alt text is written in `[]` of `![]()`. It describes the image for people who fails to load the image. |
| 25 | [MD046 - Code block style](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md046---code-block-style) | Use **three backticks** ` ``` ` to enclose code blocks in the documents. Do **not** use **four-space indentation** to indicate code blocks. |

0 comments on commit bc4a3fe

Please sign in to comment.