Skip to content

Commit 8d60717

Browse files
maoberlehnermichalsnik
authored andcommitted
Tidying up (#210)
* Prevent trimming trailing whitespace in markdown files * Use error code 2 instead of "error" consistently * Use syntax highlighting in demos consistently
1 parent 5fdb848 commit 8d60717

10 files changed

+53
-41
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ indent_size = 2
77
end_of_line = lf
88
insert_final_newline = true
99
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you want to check previous releases [go here](https://github.com/vuejs/eslint
2121

2222
## :cd: Installation
2323

24-
```
24+
```bash
2525
npm install --save-dev eslint eslint-plugin-vue@beta
2626
```
2727

docs/rules/html-self-closing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This rule has options which specify self-closing style for each context.
1616

1717
```json
1818
{
19-
"html-self-closing": ["error", {
19+
"html-self-closing": [2, {
2020
"html": {
2121
"normal": "never",
2222
"void": "never",

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ There is a configurable number of attributes that are acceptable in one-line cas
3838
sit="4"
3939
>
4040
</component>
41-
4241
```
4342

4443
### :wrench: Options
4544

46-
```
45+
```json
4746
{
4847
"vue/max-attributes-per-line": [2, {
4948
"singleline": 3,

docs/rules/no-dupe-keys.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ This rule has an object option:
5858

5959
### Example:
6060

61-
```
62-
vue/no-dupe-keys: [2, {
63-
groups: ['asyncComputed']
64-
}]
61+
```json
62+
{
63+
"vue/no-dupe-keys": [2, {
64+
"groups": ["asyncComputed"]
65+
}]
66+
}
6567
```
6668

6769
:-1: Examples of **incorrect** code for this configuration

docs/rules/no-parsing-error.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Then reports syntax errors if exist.
3737

3838
```json
3939
{
40-
"vue/no-parsing-error": ["error", {
40+
"vue/no-parsing-error": [2, {
4141
"abrupt-closing-of-empty-comment": false,
4242
"absence-of-digits-in-numeric-character-reference": false,
4343
"cdata-in-html-content": false,

docs/rules/no-reserved-keys.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ This rule has an object option:
3737

3838
### Example:
3939

40-
```
41-
vue/no-reserved-keys: [2, {
42-
reserved: ['foo', 'foo2'],
43-
groups: ['asyncComputed']
44-
}]
40+
```json
41+
{
42+
"vue/no-reserved-keys": [2, {
43+
"reserved": ["foo", "foo2"],
44+
"groups": ["asyncComputed"]
45+
}]
46+
}
4547
```
4648

4749
:-1: Examples of **incorrect** code for this configuration

docs/rules/no-reservered-keys.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ This rule has an object option:
3939

4040
### Example:
4141

42-
```
43-
vue/no-dupe-keys: [2, {
44-
reserved: ['foo']
45-
}]
42+
```json
43+
{
44+
"vue/no-dupe-keys": [2, {
45+
"reserved": ["foo"]
46+
}]
47+
}
4648
```
4749

4850
:-1: Examples of **incorrect** code for this configuration

docs/rules/order-in-components.md

+21-19
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,27 @@ export default {
6363

6464
If you want you can change the order providing the optional configuration in your `.eslintrc` file. Setting responsible for the above order looks like this:
6565

66-
```
67-
vue/order-in-components: [2, {
68-
order: [
69-
['name', 'delimiters', 'functional', 'model'],
70-
['components', 'directives', 'filters'],
71-
['parent', 'mixins', 'extends', 'provide', 'inject'],
72-
'el',
73-
'template',
74-
'props',
75-
'propsData',
76-
'data',
77-
'computed',
78-
'watch',
79-
'LIFECYCLE_HOOKS',
80-
'methods',
81-
'render',
82-
'renderError'
83-
]
84-
}]
66+
```json
67+
{
68+
"vue/order-in-components": [2, {
69+
"order": [
70+
["name", "delimiters", "functional", "model"],
71+
["components", "directives", "filters"],
72+
["parent", "mixins", "extends", "provide", "inject"],
73+
"el",
74+
"template",
75+
"props",
76+
"propsData",
77+
"data",
78+
"computed",
79+
"watch",
80+
"LIFECYCLE_HOOKS",
81+
"methods",
82+
"render",
83+
"renderError"
84+
]
85+
}]
86+
}
8587
```
8688

8789
If you want some of properties to be treated equally in order you can group them into arrays, like we did with `name`, `delimiters`, `funcitonal` and `model`.

docs/rules/return-in-computed-property.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ export default {
3737
This rule has an object option:
3838
- `"treatUndefinedAsUnspecified"`: `true` (default) disallows implicitly returning undefined with a `return;` statement.
3939

40-
```
41-
vue/return-in-computed-property: [2, {
42-
treatUndefinedAsUnspecified: true
43-
}]
40+
```json
41+
{
42+
"vue/return-in-computed-property": [2, {
43+
"treatUndefinedAsUnspecified": true
44+
}]
45+
}
4446
```

0 commit comments

Comments
 (0)