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
|: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>`|
100
-
||[no-unused-vars](./docs/rules/no-unused-vars.md)| disallow unused variable definitions of v-for directives or scope attributes |
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 |
||[jsx-uses-vars](./docs/rules/jsx-uses-vars.md)| prevent variables used in JSX to be marked as unused |
102
+
103
+
104
+
### Priority A: Essential (Error Prevention)
105
+
106
+
Enforce all the rules in this category, as well as all higher priority rules, with:
107
+
108
+
```json
109
+
"extends": "plugin:vue/essential"
110
+
```
121
111
122
112
|| Rule ID | Description |
123
113
|:---|:--------|:------------|
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 |
126
-
|: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
-
|: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 |
129
-
|:white_check_mark:|[no-textarea-mustache](./docs/rules/no-textarea-mustache.md)| disallow mustaches in `<textarea>`|
130
-
|:white_check_mark:|[order-in-components](./docs/rules/order-in-components.md)| enforce order of properties in components |
131
-
|:white_check_mark:|[require-component-is](./docs/rules/require-component-is.md)| require `v-bind:is` of `<component>` elements |
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 |
134
-
|:white_check_mark:|[require-v-for-key](./docs/rules/require-v-for-key.md)| require `v-bind:key` with `v-for` directives |
135
-
|:white_check_mark:|[this-in-template](./docs/rules/this-in-template.md)| enforce usage of `this` in template |
136
-
137
-
138
-
### Stylistic Issues
114
+
||[no-async-in-computed-properties](./docs/rules/no-async-in-computed-properties.md)| disallow asynchronous actions in computed properties |
115
+
||[no-dupe-keys](./docs/rules/no-dupe-keys.md)| disallow duplication of field names |
116
+
||[no-duplicate-attributes](./docs/rules/no-duplicate-attributes.md)| disallow duplication of attributes |
117
+
||[no-parsing-error](./docs/rules/no-parsing-error.md)| disallow parsing errors in `<template>`|
|: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 |
Copy file name to clipboardExpand all lines: docs/rules/attribute-hyphenation.md
-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
# enforce attribute naming style in template (attribute-hyphenation)
2
2
3
-
-:white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4
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
-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
# enforce end tag style (html-end-tags)
2
2
3
-
-:white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4
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-indent.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ This rule enforces a consistent indentation style in `<template>`. The default s
65
65
}
66
66
```
67
67
68
-
-`type` (`number | "tab"`) ... The type of indentation. Default is `4`. If this is a number, it's the number of spaces for one indent. If this is `"tab"`, it uses one tab for one indent.
68
+
-`type` (`number | "tab"`) ... The type of indentation. Default is `2`. If this is a number, it's the number of spaces for one indent. If this is `"tab"`, it uses one tab for one indent.
69
69
-`attribute` (`integer`) ... The multiplier of indentation for attributes. Default is `1`.
70
70
-`closeBracket` (`integer`) ... The multiplier of indentation for right brackets. Default is `0`.
71
71
-`ignores` (`string[]`) ... The selector to ignore nodes. The AST spec is [here](https://github.com/mysticatea/vue-eslint-parser/blob/master/docs/ast.md). You can use [esquery](https://github.com/estools/esquery#readme) to select nodes. Default is an empty array.
Copy file name to clipboardExpand all lines: docs/rules/html-self-closing.md
-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
# enforce self-closing style (html-self-closing)
2
2
3
-
-:white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4
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.
5
4
6
5
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
-2
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# prevent variables used in JSX to be marked as unused (jsx-uses-vars)
2
2
3
-
-:white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4
-
5
3
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)).
6
4
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
-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
# enforce unified spacing in mustache interpolations (mustache-interpolation-spacing)
2
2
3
-
-:white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4
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/name-property-casing.md
-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
# enforce specific casing for the name property in Vue components (name-property-casing)
2
2
3
-
-:white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4
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.
5
4
6
5
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
-2
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# disallow asynchronous actions in computed properties (no-async-in-computed-properties)
2
2
3
-
-:white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4
-
5
3
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.
6
4
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
-2
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# disallow confusing `v-for` and `v-if` on the same element (no-confusing-v-for-v-if)
2
2
3
-
-:white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4
-
5
3
> 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.
Copy file name to clipboardExpand all lines: docs/rules/no-multi-spaces.md
-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
# disallow multiple spaces (no-multi-spaces)
2
2
3
-
-:white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4
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.
5
4
6
5
The `--fix` option on the command line can automatically fix some of the problems reported by this rule.
Copy file name to clipboardExpand all lines: docs/rules/require-component-is.md
-2
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# require `v-bind:is` of `<component>` elements (require-component-is)
2
2
3
-
-:white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.
4
-
5
3
> You can use the same mount point and dynamically switch between multiple components using the reserved `<component>` element and dynamically bind to its `is` attribute:
0 commit comments