Skip to content

Commit 470b43c

Browse files
committed
update recommended rules to match style guide
1 parent 5f4f3ce commit 470b43c

Some content is hidden

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

52 files changed

+133
-86
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/tests/integrations/*/node_modules
44
/node_modules
55
/test.*
6+
yarn.lock

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ The `--fix` option on the command line automatically fixes problems reported by
9292

9393
| | Rule ID | Description |
9494
|:---|:--------|:------------|
95-
| | [no-dupe-keys](./docs/rules/no-dupe-keys.md) | disallow duplication of field names |
95+
| :white_check_mark: | [no-dupe-keys](./docs/rules/no-dupe-keys.md) | disallow duplication of field names |
9696
| :white_check_mark: | [no-parsing-error](./docs/rules/no-parsing-error.md) | disallow parsing errors in `<template>` |
97-
| | [no-reserved-keys](./docs/rules/no-reserved-keys.md) | disallow overwriting reserved keys |
98-
| | [no-shared-component-data](./docs/rules/no-shared-component-data.md) | enforce component's data property to be a function |
99-
| | [no-template-key](./docs/rules/no-template-key.md) | disallow `key` attribute on `<template>` |
97+
| :white_check_mark: | [no-reserved-keys](./docs/rules/no-reserved-keys.md) | disallow overwriting reserved keys |
98+
| :white_check_mark: | [no-shared-component-data](./docs/rules/no-shared-component-data.md) | enforce component's data property to be a function |
99+
| :white_check_mark: | [no-template-key](./docs/rules/no-template-key.md) | disallow `key` attribute on `<template>` |
100100
| | [no-unused-vars](./docs/rules/no-unused-vars.md) | disallow unused variable definitions of v-for directives or scope attributes |
101-
| | [require-render-return](./docs/rules/require-render-return.md) | enforce render function to always return value |
102-
| | [require-valid-default-prop](./docs/rules/require-valid-default-prop.md) | enforce props default values to be valid |
103-
| | [return-in-computed-property](./docs/rules/return-in-computed-property.md) | enforce that a return statement is present in computed property |
101+
| :white_check_mark: | [require-render-return](./docs/rules/require-render-return.md) | enforce render function to always return value |
102+
| :white_check_mark: | [require-valid-default-prop](./docs/rules/require-valid-default-prop.md) | enforce props default values to be valid |
103+
| :white_check_mark: | [return-in-computed-property](./docs/rules/return-in-computed-property.md) | enforce that a return statement is present in computed property |
104104
| :white_check_mark: | [valid-template-root](./docs/rules/valid-template-root.md) | enforce valid template root |
105105
| :white_check_mark: | [valid-v-bind](./docs/rules/valid-v-bind.md) | enforce valid `v-bind` directives |
106106
| :white_check_mark: | [valid-v-cloak](./docs/rules/valid-v-cloak.md) | enforce valid `v-cloak` directives |
@@ -121,34 +121,34 @@ The `--fix` option on the command line automatically fixes problems reported by
121121

122122
| | Rule ID | Description |
123123
|:---|:--------|:------------|
124-
| :wrench: | [html-end-tags](./docs/rules/html-end-tags.md) | enforce end tag style |
125-
| | [no-async-in-computed-properties](./docs/rules/no-async-in-computed-properties.md) | disallow asynchronous actions in computed properties |
124+
| :white_check_mark::wrench: | [html-end-tags](./docs/rules/html-end-tags.md) | enforce end tag style |
125+
| :white_check_mark: | [no-async-in-computed-properties](./docs/rules/no-async-in-computed-properties.md) | disallow asynchronous actions in computed properties |
126126
| :white_check_mark: | [no-confusing-v-for-v-if](./docs/rules/no-confusing-v-for-v-if.md) | disallow confusing `v-for` and `v-if` on the same element |
127-
| | [no-duplicate-attributes](./docs/rules/no-duplicate-attributes.md) | disallow duplication of attributes |
128-
| | [no-side-effects-in-computed-properties](./docs/rules/no-side-effects-in-computed-properties.md) | disallow side effects in computed properties |
127+
| :white_check_mark: | [no-duplicate-attributes](./docs/rules/no-duplicate-attributes.md) | disallow duplication of attributes |
128+
| :white_check_mark: | [no-side-effects-in-computed-properties](./docs/rules/no-side-effects-in-computed-properties.md) | disallow side effects in computed properties |
129129
| :white_check_mark: | [no-textarea-mustache](./docs/rules/no-textarea-mustache.md) | disallow mustaches in `<textarea>` |
130-
| | [order-in-components](./docs/rules/order-in-components.md) | enforce order of properties in components |
130+
| :white_check_mark: | [order-in-components](./docs/rules/order-in-components.md) | enforce order of properties in components |
131131
| :white_check_mark: | [require-component-is](./docs/rules/require-component-is.md) | require `v-bind:is` of `<component>` elements |
132-
| | [require-default-prop](./docs/rules/require-default-prop.md) | require default value for props |
133-
| | [require-prop-types](./docs/rules/require-prop-types.md) | require type definitions in props |
132+
| :white_check_mark: | [require-default-prop](./docs/rules/require-default-prop.md) | require default value for props |
133+
| :white_check_mark: | [require-prop-types](./docs/rules/require-prop-types.md) | require type definitions in props |
134134
| :white_check_mark: | [require-v-for-key](./docs/rules/require-v-for-key.md) | require `v-bind:key` with `v-for` directives |
135-
| | [this-in-template](./docs/rules/this-in-template.md) | enforce usage of `this` in template |
135+
| :white_check_mark: | [this-in-template](./docs/rules/this-in-template.md) | enforce usage of `this` in template |
136136

137137

138138
### Stylistic Issues
139139

140140
| | Rule ID | Description |
141141
|:---|:--------|:------------|
142-
| :wrench: | [attribute-hyphenation](./docs/rules/attribute-hyphenation.md) | enforce attribute naming style in template |
142+
| :white_check_mark::wrench: | [attribute-hyphenation](./docs/rules/attribute-hyphenation.md) | enforce attribute naming style in template |
143143
| :wrench: | [html-indent](./docs/rules/html-indent.md) | enforce consistent indentation in `<template>` |
144144
| | [html-quotes](./docs/rules/html-quotes.md) | enforce quotes style of HTML attributes |
145-
| :wrench: | [html-self-closing](./docs/rules/html-self-closing.md) | enforce self-closing style |
146-
| | [max-attributes-per-line](./docs/rules/max-attributes-per-line.md) | enforce the maximum number of attributes per line |
147-
| :wrench: | [mustache-interpolation-spacing](./docs/rules/mustache-interpolation-spacing.md) | enforce unified spacing in mustache interpolations |
148-
| :wrench: | [name-property-casing](./docs/rules/name-property-casing.md) | enforce specific casing for the name property in Vue components |
149-
| :wrench: | [no-multi-spaces](./docs/rules/no-multi-spaces.md) | disallow multiple spaces |
150-
| :wrench: | [v-bind-style](./docs/rules/v-bind-style.md) | enforce `v-bind` directive style |
151-
| :wrench: | [v-on-style](./docs/rules/v-on-style.md) | enforce `v-on` directive style |
145+
| :white_check_mark::wrench: | [html-self-closing](./docs/rules/html-self-closing.md) | enforce self-closing style |
146+
| :white_check_mark: | [max-attributes-per-line](./docs/rules/max-attributes-per-line.md) | enforce the maximum number of attributes per line |
147+
| :white_check_mark::wrench: | [mustache-interpolation-spacing](./docs/rules/mustache-interpolation-spacing.md) | enforce unified spacing in mustache interpolations |
148+
| :white_check_mark::wrench: | [name-property-casing](./docs/rules/name-property-casing.md) | enforce specific casing for the name property in Vue components |
149+
| :white_check_mark::wrench: | [no-multi-spaces](./docs/rules/no-multi-spaces.md) | disallow multiple spaces |
150+
| :white_check_mark::wrench: | [v-bind-style](./docs/rules/v-bind-style.md) | enforce `v-bind` directive style |
151+
| :white_check_mark::wrench: | [v-on-style](./docs/rules/v-on-style.md) | enforce `v-on` directive style |
152152

153153

154154
### Variables

docs/rules/attribute-hyphenation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# enforce attribute naming style in template (attribute-hyphenation)
22

3+
- :white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
34
- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.
45

56
## :wrench: Options

docs/rules/html-end-tags.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# enforce end tag style (html-end-tags)
22

3+
- :white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
34
- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.
45

56
This rule enforce the way of end tags.

docs/rules/html-self-closing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# enforce self-closing style (html-self-closing)
22

3+
- :white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
34
- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.
45

56
In Vue.js template, we can use either two styles for elements which don't have their content.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# enforce the maximum number of attributes per line (max-attributes-per-line)
22

3+
- :white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4+
35
Limits the maximum number of attributes/properties per line to improve readability.
46

57

docs/rules/mustache-interpolation-spacing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# enforce unified spacing in mustache interpolations (mustache-interpolation-spacing)
22

3+
- :white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
34
- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.
45

56
## :book: Rule Details

docs/rules/name-property-casing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# enforce specific casing for the name property in Vue components (name-property-casing)
22

3+
- :white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
34
- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.
45

56
Define a style for the `name` property casing for consistency purposes.

docs/rules/no-async-in-computed-properties.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# disallow asynchronous actions in computed properties (no-async-in-computed-properties)
22

3+
- :white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4+
35
Computed properties should be synchronous. Asynchronous actions inside them may not work as expected and can lead to an unexpected behaviour, that's why you should avoid them.
46
If you need async computed properties you might want to consider using additional plugin [vue-async-computed]
57

docs/rules/no-dupe-keys.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# disallow duplication of field names (no-dupe-keys)
22

3+
- :white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4+
35
This rule prevents to use duplicated names.
46

57
## :book: Rule Details

0 commit comments

Comments
 (0)