8000 improve consistency across docs · vuejs/eslint-plugin-vue@e2830ef · GitHub
[go: up one dir, main page]

Skip to content

Commit e2830ef

Browse files
committed
improve consistency across docs
1 parent b36f7ed commit e2830ef

9 files changed

+17
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ This rule aims to warn the right angle brackets which are at the location other
6363

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

66-
### `{ "multiline": "never" }`
66+
### `"multiline": "never"`
6767

6868
<eslint-code-block :rules="{'vue/html-closing-bracket-newline': ['error', { 'multiline': 'never' }]}">
6969
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This rule aims to enforce consistent spacing style before closing brackets `>` o
5353
- `"always"` ... requires one or more spaces.
5454
- `"never"` ... disallows spaces.
5555

56-
### `{ "startTag": "always", "endTag": "always", "selfClosingTag": "always" }`
56+
### `"startTag": "always", "endTag": "always", "selfClosingTag": "always"`
5757

5858
<eslint-code-block :rules="{'vue/html-closing-bracket-spacing': ['error', {startTag: 'always', endTag: 'always', selfClosingTag: 'always' }]}">
5959
```

docs/rules/html-self-closing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Every option can be set to one of the following values:
6161
- `"never"` ... Disallow self-closing.
6262
- `"any"` ... Don't enforce self-closing style.
6363

64-
### `{html: {normal: "never", void: "always"}}`
64+
### `html: {normal: "never", void: "always"}`
6565

6666
<eslint-code-block :rules="{'vue/html-self-closing': ['error', {html: {normal: 'never', void: 'always'}}]}">
6767
```

docs/rules/max-attributes-per-line.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ There is a configurable number of attributes that are acceptable in one-line cas
5959
- `multiline.max` (`number`) ... The max number of attributes per line when the opening tag is in multiple lines. Default is `1`. This can be `{ multiline: 1 }` instead of `{ multiline: { max: 1 }}` if you don't configure `allowFirstLine` property.
6060
- `multiline.allowFirstLine` (`boolean`) ... If `true`, it allows attributes on the same line as that tag name. Default is `false`.
6161

62-
### `{ "singleline": 3 }`
62+
### `"singleline": 3`
6363

6464
<eslint-code-block :rules="{'vue/max-attributes-per-line': ['error', {singleline: 3}]}">
6565
```
@@ -73,7 +73,7 @@ There is a configurable number of attributes that are acceptable in one-line cas
7373
```
7474
</eslint-code-block>
7575

76-
### `{ multiline: 2 }`
76+
### `multiline: 2`
7777

7878
<eslint-code-block :rules="{'vue/max-attributes-per-line': ['error', {multiline: 2}]}">
7979
```
@@ -93,7 +93,7 @@ There is a configurable number of attributes that are acceptable in one-line cas
9393
```
9494
</eslint-code-block>
9595

96-
### `{ multiline: 1, allowFirstLine: true }`
96+
### `multiline: 1, allowFirstLine: true`
9797

9898
<eslint-code-block :rules="{'vue/max-attributes-per-line': ['error', {multiline: { allowFirstLine: true }}]}">
9999
```

docs/rules/no-dupe-keys.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@ export default {
3434

3535
## :wrench: Options
3636

37-
``` json
37+
```json
3838
{
39-
"vue/no-dupe-keys": ["error", { "groups": [] }]
39+
"vue/no-dupe-keys": ["error", {
40+
"groups": []
41+
}]
4042
}
4143
```
4244

4345
- `"groups"` (`string[]`) Array of additional groups to search for duplicates. Defailt is empty.
4446

45-
### `{ "groups": ["firebase"] }`
47+
### `"groups": ["firebase"]`
4648

4749
<eslint-code-block :rules="{'vue/no-dupe-keys': ['error', {groups: ['firebase']}]}">
4850
```

docs/rules/no-duplicate-attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This rule reports duplicate attributes.
4545
[`v-bind:class`]: https://vuejs.org/v2/guide/class-and-style.html
4646
[`v-bind:style`]: https://vuejs.org/v2/guide/class-and-style.html
4747

48-
### `{ "allowCoexistClass": false, "allowCoexistStyle": false }`
48+
### `"allowCoexistClass": false, "allowCoexistStyle": false`
4949

5050
<eslint-code-block :rules="{'vue/no-duplicate-attributes': ['error', {allowCoexistClass: false, allowCoexistStyle: false}]}">
5151
```

docs/rules/no-reserved-keys.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232

3333
## :wrench: Options
3434

35-
``` json
35+
```json
3636
{
3737
"vue/no-reserved-keys": ["error", {
3838
"reserved": [],
@@ -44,7 +44,7 @@ export default {
4444
- `reserved` (`string[]`) ... Array of additional restricted attributes inside `groups`. Default is empty.
4545
- `groups` (`string[]`) ... Array of additional group names to search for duplicates in. Default is empty.
4646

47-
### `{ "reserved": ["foo", "foo2"], "groups": ["firebase"] }`
47+
### `"reserved": ["foo", "foo2"], "groups": ["firebase"]`
4848

4949
<eslint-code-block :rules="{'vue/no-reserved-keys': ['error', {reserved: ['foo', 'foo2'], groups: ['firebase']}]}">
5050
```

docs/rules/no-side-effects-in-computed-properties.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
- :gear: This rule is included in all of `"plugin:vue/essential"`, `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
44

5-
It is considered a very bad practice to introduce side effects inside computed properties. It makes the code not predictable and hard to understand.
6-
75
## :book: Rule Details
86

97
This rule is aimed at preventing the code which makes side effects in computed properties.
108

9+
It is considered a very bad practice to introduce side effects inside computed properties. It makes the code not predictable and hard to understand.
10+
1111
<eslint-code-block :rules="{'vue/no-side-effects-in-computed-properties': ['error']}">
1212
```
1313
<script>

docs/rules/no-spaces-around-equal-signs-in-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ HTML5 allows spaces around equal signs. But space-less is easier to read, and gr
2929
}
3030
```
3131

32-
## Further Reading
32+
## :books: Further reading
3333

3434
* [HTML5 Style Guide - W3Schools *Spaces and Equal Signs*](https://www.w3schools.com/html/html5_syntax.asp)
3535

0 commit comments

Comments
 (0)
0