Skip to content

Tidying up #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you want to check previous releases [go here](https://github.com/vuejs/eslint

## :cd: Installation

```
```bash
npm install --save-dev eslint eslint-plugin-vue@beta
```

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/html-self-closing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This rule has options which specify self-closing style for each context.

```json
{
"html-self-closing": ["error", {
"html-self-closing": [2, {
"html": {
"normal": "never",
"void": "never",
Expand Down
3 changes: 1 addition & 2 deletions docs/rules/max-attributes-per-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ There is a configurable number of attributes that are acceptable in one-line cas
sit="4"
>
</component>

```

### :wrench: Options

```
```json
{
"vue/max-attributes-per-line": [2, {
"singleline": 3,
Expand Down
10 changes: 6 additions & 4 deletions docs/rules/no-dupe-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ This rule has an object option:

### Example:

```
vue/no-dupe-keys: [2, {
groups: ['asyncComputed']
}]
```json
{
"vue/no-dupe-keys": [2, {
"groups": ["asyncComputed"]
}]
}
```

:-1: Examples of **incorrect** code for this configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-parsing-error.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Then reports syntax errors if exist.

```json
{
"vue/no-parsing-error": ["error", {
"vue/no-parsing-error": [2, {
"abrupt-closing-of-empty-comment": false,
"absence-of-digits-in-numeric-character-reference": false,
"cdata-in-html-content": false,
Expand Down
12 changes: 7 additions & 5 deletions docs/rules/no-reserved-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ This rule has an object option:

### Example:

```
vue/no-reserved-keys: [2, {
reserved: ['foo', 'foo2'],
groups: ['asyncComputed']
}]
```json
{
"vue/no-reserved-keys": [2, {
"reserved": ["foo", "foo2"],
"groups": ["asyncComputed"]
}]
}
```

:-1: Examples of **incorrect** code for this configuration
Expand Down
10 changes: 6 additions & 4 deletions docs/rules/no-reservered-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ This rule has an object option:

### Example:

```
vue/no-dupe-keys: [2, {
reserved: ['foo']
}]
```json
{
"vue/no-dupe-keys": [2, {
"reserved": ["foo"]
}]
}
```

:-1: Examples of **incorrect** code for this configuration
Expand Down
40 changes: 21 additions & 19 deletions docs/rules/order-in-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,27 @@ export default {

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:

```
vue/order-in-components: [2, {
order: [
['name', 'delimiters', 'functional', 'model'],
['components', 'directives', 'filters'],
['parent', 'mixins', 'extends', 'provide', 'inject'],
'el',
'template',
'props',
'propsData',
'data',
'computed',
'watch',
'LIFECYCLE_HOOKS',
'methods',
'render',
'renderError'
]
}]
```json
{
"vue/order-in-components": [2, {
"order": [
["name", "delimiters", "functional", "model"],
["components", "directives", "filters"],
["parent", "mixins", "extends", "provide", "inject"],
"el",
"template",
"props",
"propsData",
"data",
"computed",
"watch",
"LIFECYCLE_HOOKS",
"methods",
"render",
"renderError"
]
}]
}
```

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`.
10 changes: 6 additions & 4 deletions docs/rules/return-in-computed-property.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ export default {
This rule has an object option:
- `"treatUndefinedAsUnspecified"`: `true` (default) disallows implicitly returning undefined with a `return;` statement.

```
vue/return-in-computed-property: [2, {
treatUndefinedAsUnspecified: true
}]
```json
{
"vue/return-in-computed-property": [2, {
"treatUndefinedAsUnspecified": true
}]
}
```