You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
182
185
183
186
Enforce all the rules in this category, as well as all higher priority rules, with:
184
187
185
-
```json
186
-
"extends": "plugin:vue/recommended"
188
+
```json
189
+
{
190
+
"extends": "plugin:vue/recommended"
191
+
}
187
192
```
188
193
189
194
|| Rule ID | Description |
190
195
|:---|:--------|:------------|
191
-
|:wrench:|[html-quotes](./docs/rules/html-quotes.md)| enforce quotes style of HTML attributes |
192
-
||[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 |
193
-
||[order-in-components](./docs/rules/order-in-components.md)| enforce order of properties in components |
194
-
||[this-in-template](./docs/rules/this-in-template.md)| enforce usage of `this` in template |
195
-
196
-
197
-
### Uncategorized
198
-
199
-
|| Rule ID | Description |
200
-
|:---|:--------|:------------|
201
-
|:wrench:|[html-closing-bracket-newline](./docs/rules/html-closing-bracket-newline.md)| require or disallow a line break before tag's closing brackets |
202
-
|:wrench:|[html-closing-bracket-spacing](./docs/rules/html-closing-bracket-spacing.md)| require or disallow a space before tag's closing brackets |
203
-
196
+
|:wrench:|[vue/html-quotes](./docs/rules/html-quotes.md)| enforce quotes style of HTML attributes |
197
+
||[vue/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 |
198
+
||[vue/order-in-components](./docs/rules/order-in-components.md)| enforce order of properties in components |
199
+
||[vue/this-in-template](./docs/rules/this-in-template.md)| enforce usage of `this` in template |
204
200
205
201
### Uncategorized
206
202
207
203
|| Rule ID | Description |
208
204
|:---|:--------|:------------|
209
-
|:wrench:|[html-closing-bracket-newline](./docs/rules/html-closing-bracket-newline.md)| require or disallow a line break before tag's closing brackets |
210
-
|:wrench:|[html-closing-bracket-spacing](./docs/rules/html-closing-bracket-spacing.md)| require or disallow a space before tag's closing brackets |
205
+
|:wrench:|[vue/html-closing-bracket-newline](./docs/rules/html-closing-bracket-newline.md)| require or disallow a line break before tag's closing brackets |
206
+
|:wrench:|[vue/html-closing-bracket-spacing](./docs/rules/html-closing-bracket-spacing.md)| require or disallow a space before tag's closing brackets |
Copy file name to clipboardexpand all lines: docs/rules/attribute-hyphenation.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
-
# enforce attribute naming style in template (attribute-hyphenation)
1
+
# enforce attribute naming style in template (vue/attribute-hyphenation)
2
2
3
+
-:gear: This rule is included in `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
3
4
-: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.
Copy file name to clipboardexpand all lines: docs/rules/comment-directive.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
# support comment-directives in `<template>` (comment-directive)
1
+
# support comment-directives in `<template>` (vue/comment-directive)
2
+
3
+
-:gear: This rule is included in all of `"plugin:vue/base"`, `"plugin:vue/essential"`, `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
2
4
3
5
Sole purpose of this rule is to provide `eslint-disable` functionality in `<template>`.
Copy file name to clipboardexpand all lines: docs/rules/html-closing-bracket-newline.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# require or disallow a line break before tag's closing brackets (html-closing-bracket-newline)
1
+
# require or disallow a line break before tag's closing brackets (vue/html-closing-bracket-newline)
2
2
3
3
-: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.
Copy file name to clipboardexpand all lines: docs/rules/html-closing-bracket-spacing.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# require or disallow a space before tag's closing brackets (html-closing-bracket-spacing)
1
+
# require or disallow a space before tag's closing brackets (vue/html-closing-bracket-spacing)
2
2
3
3
-: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.
Copy file name to clipboardexpand all lines: docs/rules/html-end-tags.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
-
# enforce end tag style (html-end-tags)
1
+
# enforce end tag style (vue/html-end-tags)
2
2
3
+
-:gear: This rule is included in `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
3
4
-: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.
Copy file name to clipboardexpand all lines: docs/rules/html-indent.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
-
# enforce consistent indentation in `<template>` (html-indent)
1
+
# enforce consistent indentation in `<template>` (vue/html-indent)
2
2
3
+
-:gear: This rule is included in `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
3
4
-: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.
Copy file name to clipboardexpand all lines: docs/rules/html-quotes.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
-
# enforce quotes style of HTML attributes (html-quotes)
1
+
# enforce quotes style of HTML attributes (vue/html-quotes)
2
2
3
+
-:gear: This rule is included in `"plugin:vue/recommended"`.
3
4
-: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.
-:gear: This rule is included in `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
3
4
-: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.
4
5
5
6
In Vue.js template, we can use either two styles for elements which don't have their content.
Copy file name to clipboardexpand all lines: docs/rules/jsx-uses-vars.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
# prevent variables used in JSX to be marked as unused (jsx-uses-vars)
1
+
# prevent variables used in JSX to be marked as unused (vue/jsx-uses-vars)
2
+
3
+
-:gear: This rule is included in all of `"plugin:vue/base"`, `"plugin:vue/essential"`, `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
2
4
3
5
Since 0.17.0 the ESLint `no-unused-vars` rule does not detect variables used in JSX ([see details](http://eslint.org/blog/2015/03/eslint-0.17.0-released#changes-to-jsxreact-handling)).
4
6
This rule will find variables used in JSX and mark them as used.
Copy file name to clipboardexpand all lines: docs/rules/mustache-interpolation-spacing.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
-
# enforce unified spacing in mustache interpolations (mustache-interpolation-spacing)
1
+
# enforce unified spacing in mustache interpolations (vue/mustache-interpolation-spacing)
2
2
3
+
-:gear: This rule is included in `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
3
4
-: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.
Copy file name to clipboardexpand all lines: docs/rules/name-property-casing.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
-
# enforce specific casing for the name property in Vue components (name-property-casing)
1
+
# enforce specific casing for the name property in Vue components (vue/name-property-casing)
2
2
3
+
-:gear: This rule is included in `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
3
4
-: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.
4
5
5
6
Define a style for the `name` property casing for consistency purposes.
Copy file name to clipboardexpand all lines: docs/rules/no-async-in-computed-properties.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
# disallow asynchronous actions in computed properties (no-async-in-computed-properties)
1
+
# disallow asynchronous actions in computed properties (vue/no-async-in-computed-properties)
2
+
3
+
-:gear: This rule is included in all of `"plugin:vue/essential"`, `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
2
4
3
5
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.
4
6
If you need async computed properties you might want to consider using additional plugin [vue-async-computed]
Copy file name to clipboardexpand all lines: docs/rules/no-confusing-v-for-v-if.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
# disallow confusing `v-for` and `v-if` on the same element (no-confusing-v-for-v-if)
1
+
# disallow confusing `v-for` and `v-if` on the same element (vue/no-confusing-v-for-v-if)
2
+
3
+
-:gear: This rule is included in `"plugin:vue/recommended"`.
2
4
3
5
> When they exist on the same node, `v-for` has a higher priority than `v-if`. That means the `v-if` will be run on each iteration of the loop separately.
0 commit comments