Skip to content

Commit 0924d62

Browse files
authored
Lint docs (#1821)
* Add rule docs headings checker * Fix typo in rule docs heading * Standardize heading order in rule docs * Add markdownlint * Use `dash` style for all unordered lists `ul-style` MarkdownLint rule * Standardize unordered list indentation `ul-indent` MarkdownLint rule * Remove trailing spaces `no-trailing-spaces` MarkdownLint rule * Collapse consecutive empty lines `no-multiple-blanks` MarkdownLint rule * Add empty line after headings `blanks-around-headings` MarkdownLint rule * Add empty lines after code blocks `blanks-around-fences` MarkdownLint rule * Add empty lines before lists `blanks-around-lists` MarkdownLint rule * Add link title `no-bare-urls` MarkdownLint rule * Convert bold paragraph to heading `no-emphasis-as-heading` MarkdownLint rule * Fix trailing space in inline code `no-space-in-code` MarkdownLint rule * Add language to code blocks `fenced-code-language` MarkdownLint rule * Disable `no-inline-html` MarkdownLint rule in one place * Fix wrong link syntax
1 parent 8f09420 commit 0924d62

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+170
-111
lines changed

.markdownlint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
line-length: false
2+
single-title: false
3+
no-inline-html:
4+
allowed_elements:
5+
- badge
6+
- eslint-code-block
7+
- sup
8+
9+
# enforce consistency
10+
code-block-style:
11+
style: fenced
12+
code-fence-style:
13+
style: backtick
14+
emphasis-style:
15+
style: asterisk
16+
heading-style:
17+
style: atx
18+
hr-style:
19+
style: ---
20+
strong-style:
21+
style: asterisk
22+
ul-style:
23+
style: dash

.markdownlintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

docs/rules/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ sidebarDepth: 0
1212
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
1313
:::
1414

15-
1615
## Base Rules (Enabling Correct ESLint Parsing)
1716

1817
Enforce all the rules in this category, as well as all higher priority rules, with:

docs/rules/custom-event-name-casing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ export default {
163163

164164
</eslint-code-block>
165165

166+
## :couple: Related Rules
167+
168+
- [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md)
169+
- [vue/prop-name-casing](./prop-name-casing.md)
170+
166171
## :books: Further Reading
167172

168173
- [Guide - Custom Events]
@@ -171,11 +176,6 @@ export default {
171176
[Guide - Custom Events]: https://vuejs.org/guide/components/events.html
172177
[Guide (for v2) - Custom Events]: https://v2.vuejs.org/v2/guide/components-custom-events.html
173178

174-
## :couple: Related Rules
175-
176-
- [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md)
177-
- [vue/prop-name-casing](./prop-name-casing.md)
178-
179179
## :rocket: Version
180180

181181
This rule was introduced in eslint-plugin-vue v7.0.0

docs/rules/html-closing-bracket-newline.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ This rule aims to warn the right angle brackets which are at the location other
6666
```
6767

6868
- `singleline` ... the configuration for single-line elements. It's a single-line element if the element does not have attributes or the last attribute is on the same line as the opening bracket.
69-
- `"never"` (default) ... disallow line breaks before the closing bracket.
70-
- `"always"` ... require one line break before the closing bracket.
69+
- `"never"` (default) ... disallow line breaks before the closing bracket.
70+
- `"always"` ... require one line break before the closing bracket.
7171
- `multiline` ... the configuration for multiline elements. It's a multiline element if the last attribute is not on the same line of the opening bracket.
72-
- `"never"` ... disallow line breaks before the closing bracket.
73-
- `"always"` (default) ... require one line break before the closing bracket.
72+
- `"never"` ... disallow line breaks before the closing bracket.
73+
- `"always"` (default) ... require one line break before the closing bracket.
7474

7575
Plus, you can use [`vue/html-indent`](./html-indent.md) rule to enforce indent-level of the closing brackets.
7676

docs/rules/html-closing-bracket-spacing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ This rule aims to enforce consistent spacing style before closing brackets `>` o
5555
```
5656

5757
- `startTag` (`"always" | "never"`) ... Setting for the `>` of start tags (e.g. `<div>`). Default is `"never"`.
58-
- `"always"` ... requires one or more spaces.
59-
- `"never"` ... disallows spaces.
58+
- `"always"` ... requires one or more spaces.
59+
- `"never"` ... disallows spaces.
6060
- `endTag` (`"always" | "never"`) ... Setting for the `>` of end tags (e.g. `</div>`). Default is `"never"`.
61-
- `"always"` ... requires one or more spaces.
62-
- `"never"` ... disallows spaces.
61+
- `"always"` ... requires one or more spaces.
62+
- `"never"` ... disallows spaces.
6363
- `selfClosingTag` (`"always" | "never"`) ... Setting for the `/>` of self-closing tags (e.g. `<div/>`). Default is `"always"`.
64-
- `"always"` ... requires one or more spaces.
65-
- `"never"` ... disallows spaces.
64+
- `"always"` ... requires one or more spaces.
65+
- `"never"` ... disallows spaces.
6666

6767
### `"startTag": "always", "endTag": "always", "selfClosingTag": "always"`
6868

docs/rules/html-comment-content-newline.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ This rule will enforce consistency of line break after the `<!--` and before the
5656
```
5757

5858
- The first option is either an object with `"singleline"` and `"multiline"` keys.
59-
- `singleline` ... the configuration for single-line comments.
60-
- `"never"` (default) ... disallow line breaks after the `<!--` and before the `-->`.
61-
- `"always"` ... require one line break after the `<!--` and before the `-->`.
62-
- `multiline` ... the configuration for multiline comments.
63-
- `"never"` ... disallow line breaks after the `<!--` and before the `-->`.
64-
- `"always"` (default) ... require one line break after the `<!--` and before the `-->`.
59+
- `singleline` ... the configuration for single-line comments.
60+
- `"never"` (default) ... disallow line breaks after the `<!--` and before the `-->`.
61+
- `"always"` ... require one line break after the `<!--` and before the `-->`.
62+
- `multiline` ... the configuration for multiline comments.
63+
- `"never"` ... disallow line breaks after the `<!--` and before the `-->`.
64+
- `"always"` (default) ... require one line break after the `<!--` and before the `-->`.
6565

66-
You can also set the same value for both `singleline` and `multiline` by specifies a string.
66+
You can also set the same value for both `singleline` and `multiline` by specifies a string.
6767

6868
- This rule can also take a 2nd option, an object with the following key: `"exceptions"`.
69-
- The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule.
69+
- The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule.
7070

71-
```json
72-
"vue/html-comment-content-newline": ["error", { ... }, { "exceptions": ["*"] }]
73-
```
71+
```json
72+
"vue/html-comment-content-newline": ["error", { ... }, { "exceptions": ["*"] }]
73+
```
7474

7575
### `"always"`
7676

@@ -162,7 +162,6 @@ This rule will enforce consistency of line break after the `<!--` and before the
162162

163163
</eslint-code-block>
164164

165-
166165
### `{"singleline": "ignore", "multiline": "always"}`
167166

168167
<eslint-code-block fix :rules="{'vue/html-comment-content-newline': ['error', { 'singleline': 'ignore', 'multiline': 'always' }]}">

docs/rules/html-comment-content-spacing.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,16 @@ Whitespace after the `<!--` and before the `-->` makes it easier to read text in
4848
```
4949

5050
- The first is a string which be either `"always"` or `"never"`. The default is `"always"`.
51-
- `"always"` (default) ... there must be at least one whitespace at after the `<!--` and before the `-->`.
52-
- `"never"` ... there should be no whitespace at after the `<!--` and before the `-->`.
53-
51+
- `"always"` (default) ... there must be at least one whitespace at after the `<!--` and before the `-->`.
52+
- `"never"` ... there should be no whitespace at after the `<!--` and before the `-->`.
5453

5554
- This rule can also take a 2nd option, an object with the following key: `"exceptions"`.
56-
- The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule.
57-
Please note that exceptions are ignored if the first argument is `"never"`.
55+
- The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule.
56+
Please note that exceptions are ignored if the first argument is `"never"`.
5857

59-
```json
60-
"vue/html-comment-content-spacing": ["error", "always", { "exceptions": ["*"] }]
61-
```
58+
```json
59+
"vue/html-comment-content-spacing": ["error", "always", { "exceptions": ["*"] }]
60+
```
6261

6362
### `"always"`
6463

docs/rules/max-len.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ var foo = ['line', 'length', 'is', '50', '......']
112112

113113
</eslint-code-block>
114114

115-
116115
### `"template": 120`
117116

118117
<eslint-code-block :rules="{'vue/max-len': ['error', {template: 120}]}">

docs/rules/new-line-between-multi-line-property.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default {
7575

7676
</eslint-code-block>
7777

78-
## :wrench: Option
78+
## :wrench: Options
7979

8080
```json
8181
{

0 commit comments

Comments
 (0)