Skip to content

Commit bf77169

Browse files
authored
Change presets configs. (#1603)
* Change config * valid-next-tick to essential * update * Update
1 parent 14a17d4 commit bf77169

27 files changed

+60
-39
lines changed

docs/rules/README.md

+15-11
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
3939

4040
| Rule ID | Description | |
4141
|:--------|:------------|:---|
42+
| [vue/multi-word-component-names](./multi-word-component-names.md) | require component names to be always multi-word | |
4243
| [vue/no-arrow-functions-in-watch](./no-arrow-functions-in-watch.md) | disallow using arrow functions to define watcher | |
4344
| [vue/no-async-in-computed-properties](./no-async-in-computed-properties.md) | disallow asynchronous actions in computed properties | |
45+
| [vue/no-computed-properties-in-data](./no-computed-properties-in-data.md) | disallow accessing computed properties in `data`. | |
4446
| [vue/no-deprecated-data-object-declaration](./no-deprecated-data-object-declaration.md) | disallow using deprecated object declaration on data (in Vue.js 3.0.0+) | :wrench: |
4547
| [vue/no-deprecated-destroyed-lifecycle](./no-deprecated-destroyed-lifecycle.md) | disallow using deprecated `destroyed` and `beforeDestroy` lifecycle hooks (in Vue.js 3.0.0+) | :wrench: |
4648
| [vue/no-deprecated-dollar-listeners-api](./no-deprecated-dollar-listeners-api.md) | disallow using deprecated `$listeners` (in Vue.js 3.0.0+) | |
@@ -51,16 +53,19 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
5153
| [vue/no-deprecated-html-element-is](./no-deprecated-html-element-is.md) | disallow using deprecated the `is` attribute on HTML elements (in Vue.js 3.0.0+) | |
5254
| [vue/no-deprecated-inline-template](./no-deprecated-inline-template.md) | disallow using deprecated `inline-template` attribute (in Vue.js 3.0.0+) | |
5355
| [vue/no-deprecated-props-default-this](./no-deprecated-props-default-this.md) | disallow deprecated `this` access in props default function (in Vue.js 3.0.0+) | |
56+
| [vue/no-deprecated-router-link-tag-prop](./no-deprecated-router-link-tag-prop.md) | disallow using deprecated `tag` property on `RouterLink` (in Vue.js 3.0.0+) | |
5457
| [vue/no-deprecated-scope-attribute](./no-deprecated-scope-attribute.md) | disallow deprecated `scope` attribute (in Vue.js 2.5.0+) | :wrench: |
5558
| [vue/no-deprecated-slot-attribute](./no-deprecated-slot-attribute.md) | disallow deprecated `slot` attribute (in Vue.js 2.6.0+) | :wrench: |
5659
| [vue/no-deprecated-slot-scope-attribute](./no-deprecated-slot-scope-attribute.md) | disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+) | :wrench: |
5760
| [vue/no-deprecated-v-bind-sync](./no-deprecated-v-bind-sync.md) | disallow use of deprecated `.sync` modifier on `v-bind` directive (in Vue.js 3.0.0+) | :wrench: |
61+
| [vue/no-deprecated-v-is](./no-deprecated-v-is.md) | disallow deprecated `v-is` directive (in Vue.js 3.1.0+) | :wrench: |
5862
| [vue/no-deprecated-v-on-native-modifier](./no-deprecated-v-on-native-modifier.md) | disallow using deprecated `.native` modifiers (in Vue.js 3.0.0+) | |
5963
| [vue/no-deprecated-v-on-number-modifiers](./no-deprecated-v-on-number-modifiers.md) | disallow using deprecated number (keycode) modifiers (in Vue.js 3.0.0+) | :wrench: |
6064
| [vue/no-deprecated-vue-config-keycodes](./no-deprecated-vue-config-keycodes.md) | disallow using deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+) | |
6165
| [vue/no-dupe-keys](./no-dupe-keys.md) | disallow duplication of field names | |
6266
| [vue/no-dupe-v-else-if](./no-dupe-v-else-if.md) | disallow duplicate conditions in `v-if` / `v-else-if` chains | |
6367
| [vue/no-duplicate-attributes](./no-duplicate-attributes.md) | disallow duplication of attributes | |
68+
| [vue/no-export-in-script-setup](./no-export-in-script-setup.md) | disallow `export` in `<script setup>` | |
6469
| [vue/no-lifecycle-after-await](./no-lifecycle-after-await.md) | disallow asynchronously registered lifecycle hooks | |
6570
| [vue/no-mutating-props](./no-mutating-props.md) | disallow mutation of component props | |
6671
| [vue/no-parsing-error](./no-parsing-error.md) | disallow parsing errors in `<template>` | |
@@ -74,6 +79,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
7479
| [vue/no-unused-components](./no-unused-components.md) | disallow registering components that are not used inside templates | |
7580
| [vue/no-unused-vars](./no-unused-vars.md) | disallow unused variable definitions of v-for directives or scope attributes | |
7681
| [vue/no-use-v-if-with-v-for](./no-use-v-if-with-v-for.md) | disallow use v-if on the same element as v-for | |
82+
| [vue/no-useless-template-attributes](./no-useless-template-attributes.md) | disallow useless attribute on `<template>` | |
7783
| [vue/no-v-for-template-key-on-child](./no-v-for-template-key-on-child.md) | disallow key of `<template v-for>` placed on child elements | |
7884
| [vue/no-watch-after-await](./no-watch-after-await.md) | disallow asynchronously registered `watch` | |
7985
| [vue/require-component-is](./require-component-is.md) | require `v-bind:is` of `<component>` elements | |
@@ -86,6 +92,9 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
8692
| [vue/return-in-computed-property](./return-in-computed-property.md) | enforce that a return statement is present in computed property | |
8793
| [vue/return-in-emits-validator](./return-in-emits-validator.md) | enforce that a return statement is present in emits validator | |
8894
| [vue/use-v-on-exact](./use-v-on-exact.md) | enforce usage of `exact` modifier on `v-on` | |
95+
| [vue/valid-define-emits](./valid-define-emits.md) | enforce valid `defineEmits` compiler macro | |
96+
| [vue/valid-define-props](./valid-define-props.md) | enforce valid `defineProps` compiler macro | |
97+
| [vue/valid-next-tick](./valid-next-tick.md) | enforce valid `nextTick` function calls | :wrench: |
8998
| [vue/valid-template-root](./valid-template-root.md) | enforce valid template root | |
9099
| [vue/valid-v-bind](./valid-v-bind.md) | enforce valid `v-bind` directives | |
91100
| [vue/valid-v-cloak](./valid-v-cloak.md) | enforce valid `v-cloak` directives | |
@@ -95,6 +104,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
95104
| [vue/valid-v-html](./valid-v-html.md) | enforce valid `v-html` directives | |
96105
| [vue/valid-v-if](./valid-v-if.md) | enforce valid `v-if` directives | |
97106
| [vue/valid-v-is](./valid-v-is.md) | enforce valid `v-is` directives | |
107+
| [vue/valid-v-memo](./valid-v-memo.md) | enforce valid `v-memo` directives | |
98108
| [vue/valid-v-model](./valid-v-model.md) | enforce valid `v-model` directives | |
99109
| [vue/valid-v-on](./valid-v-on.md) | enforce valid `v-on` directives | |
100110
| [vue/valid-v-once](./valid-v-once.md) | enforce valid `v-once` directives | |
@@ -137,6 +147,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
137147
| [vue/require-prop-types](./require-prop-types.md) | require type definitions in props | |
138148
| [vue/singleline-html-element-content-newline](./singleline-html-element-content-newline.md) | require a line break before and after the contents of a singleline element | :wrench: |
139149
| [vue/v-bind-style](./v-bind-style.md) | enforce `v-bind` directive style | :wrench: |
150+
| [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md) | enforce v-on event naming style on custom components in template | :wrench: |
140151
| [vue/v-on-style](./v-on-style.md) | enforce `v-on` directive style | :wrench: |
141152
| [vue/v-slot-style](./v-slot-style.md) | enforce `v-slot` directive style | :wrench: |
142153

@@ -172,8 +183,10 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
172183

173184
| Rule ID | Description | |
174185
|:--------|:------------|:---|
186+
| [vue/multi-word-component-names](./multi-word-component-names.md) | require component names to be always multi-word | |
175187
| [vue/no-arrow-functions-in-watch](./no-arrow-functions-in-watch.md) | disallow using arrow functions to define watcher | |
176188
| [vue/no-async-in-computed-properties](./no-async-in-computed-properties.md) | disallow asynchronous actions in computed properties | |
189+
| [vue/no-computed-properties-in-data](./no-computed-properties-in-data.md) | disallow accessing computed properties in `data`. | |
177190
| [vue/no-custom-modifiers-on-v-model](./no-custom-modifiers-on-v-model.md) | disallow custom modifiers on v-model used on the component | |
178191
| [vue/no-dupe-keys](./no-dupe-keys.md) | disallow duplication of field names | |
179192
| [vue/no-dupe-v-else-if](./no-dupe-v-else-if.md) | disallow duplicate conditions in `v-if` / `v-else-if` chains | |
@@ -189,6 +202,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
189202
| [vue/no-unused-components](./no-unused-components.md) | disallow registering components that are not used inside templates | |
190203
| [vue/no-unused-vars](./no-unused-vars.md) | disallow unused variable definitions of v-for directives or scope attributes | |
191204
| [vue/no-use-v-if-with-v-for](./no-use-v-if-with-v-for.md) | disallow use v-if on the same element as v-for | |
205+
| [vue/no-useless-template-attributes](./no-useless-template-attributes.md) | disallow useless attribute on `<template>` | |
192206
| [vue/no-v-for-template-key](./no-v-for-template-key.md) | disallow `key` attribute on `<template v-for>` | |
193207
| [vue/no-v-model-argument](./no-v-model-argument.md) | disallow adding an argument to `v-model` used in custom component | |
194208
| [vue/require-component-is](./require-component-is.md) | require `v-bind:is` of `<component>` elements | |
@@ -198,6 +212,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
198212
| [vue/require-valid-default-prop](./require-valid-default-prop.md) | enforce props default values to be valid | |
199213
| [vue/return-in-computed-property](./return-in-computed-property.md) | enforce that a return statement is present in computed property | |
200214
| [vue/use-v-on-exact](./use-v-on-exact.md) | enforce usage of `exact` modifier on `v-on` | |
215+
| [vue/valid-next-tick](./valid-next-tick.md) | enforce valid `nextTick` function calls | :wrench: |
201216
| [vue/valid-template-root](./valid-template-root.md) | enforce valid template root | |
202217
| [vue/valid-v-bind-sync](./valid-v-bind-sync.md) | enforce valid `.sync` modifier on `v-bind` directives | |
203218
| [vue/valid-v-bind](./valid-v-bind.md) | enforce valid `v-bind` directives | |
@@ -298,17 +313,12 @@ For example:
298313
| [vue/html-comment-content-spacing](./html-comment-content-spacing.md) | enforce unified spacing in HTML comments | :wrench: |
299314
| [vue/html-comment-indent](./html-comment-indent.md) | enforce consistent indentation in HTML comments | :wrench: |
300315
| [vue/match-component-file-name](./match-component-file-name.md) | require component name property to match its file name | |
301-
| [vue/multi-word-component-names](./multi-word-component-names.md) | require component names to be always multi-word | |
302316
| [vue/new-line-between-multi-line-property](./new-line-between-multi-line-property.md) | enforce new lines between multi-line properties in Vue components | :wrench: |
303317
| [vue/next-tick-style](./next-tick-style.md) | enforce Promise or callback style in `nextTick` | :wrench: |
304318
| [vue/no-bare-strings-in-template](./no-bare-strings-in-template.md) | disallow the use of bare strings in `<template>` | |
305319
| [vue/no-boolean-default](./no-boolean-default.md) | disallow boolean defaults | :wrench: |
306-
| [vue/no-computed-properties-in-data](./no-computed-properties-in-data.md) | disallow accessing computed properties in `data`. | |
307-
| [vue/no-deprecated-router-link-tag-prop](./no-deprecated-router-link-tag-prop.md) | disallow using deprecated `tag` property on `RouterLink` (in Vue.js 3.0.0+) | |
308-
| [vue/no-deprecated-v-is](./no-deprecated-v-is.md) | disallow deprecated `v-is` directive (in Vue.js 3.1.0+) | :wrench: |
309320
| [vue/no-duplicate-attr-inheritance](./no-duplicate-attr-inheritance.md) | enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"` | |
310321
| [vue/no-empty-component-block](./no-empty-component-block.md) | disallow the `<template>` `<script>` `<style>` block to be empty | |
311-
| [vue/no-export-in-script-setup](./no-export-in-script-setup.md) | disallow `export` in `<script setup>` | |
312322
| [vue/no-invalid-model-keys](./no-invalid-model-keys.md) | require valid keys in model option | |
313323
| [vue/no-multiple-objects-in-class](./no-multiple-objects-in-class.md) | disallow to pass multiple objects into array to class | |
314324
| [vue/no-potential-component-option-typo](./no-potential-component-option-typo.md) | disallow a potential typo in your component property | |
@@ -331,7 +341,6 @@ For example:
331341
| [vue/no-unused-refs](./no-unused-refs.md) | disallow unused refs | |
332342
| [vue/no-use-computed-property-like-method](./no-use-computed-property-like-method.md) | disallow use computed property like method | |
333343
| [vue/no-useless-mustaches](./no-useless-mustaches.md) | disallow unnecessary mustache interpolations | :wrench: |
334-
| [vue/no-useless-template-attributes](./no-useless-template-attributes.md) | disallow useless attribute on `<template>` | |
335344
| [vue/no-useless-v-bind](./no-useless-v-bind.md) | disallow unnecessary `v-bind` directives | :wrench: |
336345
| [vue/no-v-text](./no-v-text.md) | disallow use of v-text | |
337346
| [vue/padding-line-between-blocks](./padding-line-between-blocks.md) | require or disallow padding lines between blocks | :wrench: |
@@ -343,12 +352,7 @@ For example:
343352
| [vue/sort-keys](./sort-keys.md) | enforce sort-keys in a manner that is compatible with order-in-components | |
344353
| [vue/static-class-names-order](./static-class-names-order.md) | enforce static class names order | :wrench: |
345354
| [vue/v-for-delimiter-style](./v-for-delimiter-style.md) | enforce `v-for` directive's delimiter style | :wrench: |
346-
| [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md) | enforce v-on event naming style on custom components in template | :wrench: |
347355
| [vue/v-on-function-call](./v-on-function-call.md) | enforce or forbid parentheses after method calls without arguments in `v-on` directives | :wrench: |
348-
| [vue/valid-define-emits](./valid-define-emits.md) | enforce valid `defineEmits` compiler macro | |
349-
| [vue/valid-define-props](./valid-define-props.md) | enforce valid `defineProps` compiler macro | |
350-
| [vue/valid-next-tick](./valid-next-tick.md) | enforce valid `nextTick` function calls | :wrench: |
351-
| [vue/valid-v-memo](./valid-v-memo.md) | enforce valid `v-memo` directives | |
352356

353357
### Extension Rules
354358

docs/rules/multi-word-component-names.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: v7.20.0
99

1010
> require component names to be always multi-word
1111
12+
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/essential"`, `"plugin:vue/vue3-strongly-recommended"`, `"plugin:vue/strongly-recommended"`, `"plugin:vue/vue3-recommended"` and `"plugin:vue/recommended"`.
13+
1214
## :book: Rule Details
1315

1416
This rule require component names to be always multi-word, except for root `App`

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

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: v7.20.0
99

1010
> disallow accessing computed properties in `data`.
1111
12+
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/essential"`, `"plugin:vue/vue3-strongly-recommended"`, `"plugin:vue/strongly-recommended"`, `"plugin:vue/vue3-recommended"` and `"plugin:vue/recommended"`.
13+
1214
## :book: Rule Details
1315

1416
This rule disallow accessing computed properties in `data()`.

docs/rules/no-deprecated-router-link-tag-prop.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: v7.20.0
99

1010
> disallow using deprecated `tag` property on `RouterLink` (in Vue.js 3.0.0+)
1111
12+
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
13+
1214
## :book: Rule Details
1315

1416
This rule reports deprecated the `tag` attribute on `RouterLink` elements (removed in Vue.js v3.0.0+).

docs/rules/no-deprecated-v-is.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ since: v7.11.0
99

1010
> disallow deprecated `v-is` directive (in Vue.js 3.1.0+)
1111
12+
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
1213
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
1314

1415
## :book: Rule Details

docs/rules/no-export-in-script-setup.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: v7.13.0
99

1010
> disallow `export` in `<script setup>`
1111
12+
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
13+
1214
## :book: Rule Details
1315

1416
This rule warns ES module exports in `<script setup>`.

docs/rules/no-useless-template-attributes.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: v7.19.0
99

1010
> disallow useless attribute on `<template>`
1111
12+
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/essential"`, `"plugin:vue/vue3-strongly-recommended"`, `"plugin:vue/strongly-recommended"`, `"plugin:vue/vue3-recommended"` and `"plugin:vue/recommended"`.
13+
1214
## :book: Rule Details
1315

1416
This rule to prevent any useless attribute on `<template>` tags.

docs/rules/v-on-event-hyphenation.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ since: v7.4.0
99

1010
> enforce v-on event naming style on custom components in template
1111
12+
- :gear: This rule is included in `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
1213
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
1314

1415
## :book: Rule Details

docs/rules/valid-define-emits.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: v7.13.0
99

1010
> enforce valid `defineEmits` compiler macro
1111
12+
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
13+
1214
This rule checks whether `defineEmits` compiler macro is valid.
1315

1416
## :book: Rule Details

docs/rules/valid-define-props.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: v7.13.0
99

1010
> enforce valid `defineProps` compiler macro
1111
12+
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
13+
1214
This rule checks whether `defineProps` compiler macro is valid.
1315

1416
## :book: Rule Details

docs/rules/valid-next-tick.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ since: v7.5.0
99

1010
> enforce valid `nextTick` function calls
1111
12+
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/essential"`, `"plugin:vue/vue3-strongly-recommended"`, `"plugin:vue/strongly-recommended"`, `"plugin:vue/vue3-recommended"` and `"plugin:vue/recommended"`.
1213
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
1314

1415
## :book: Rule Details

docs/rules/valid-v-memo.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: v7.16.0
99

1010
> enforce valid `v-memo` directives
1111
12+
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
13+
1214
This rule checks whether every `v-memo` directive is valid.
1315

1416
## :book: Rule Details

lib/configs/essential.js

+4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
module.exports = {
77
extends: require.resolve('./base'),
88
rules: {
9+
'vue/multi-word-component-names': 'error',
910
'vue/no-arrow-functions-in-watch': 'error',
1011
'vue/no-async-in-computed-properties': 'error',
12+
'vue/no-computed-properties-in-data': 'error',
1113
'vue/no-custom-modifiers-on-v-model': 'error',
1214
'vue/no-dupe-keys': 'error',
1315
'vue/no-dupe-v-else-if': 'error',
@@ -23,6 +25,7 @@ module.exports = {
2325
'vue/no-unused-components': 'error',
2426
'vue/no-unused-vars': 'error',
2527
'vue/no-use-v-if-with-v-for': 'error',
28+
'vue/no-useless-template-attributes': 'error',
2629
'vue/no-v-for-template-key': 'error',
2730
'vue/no-v-model-argument': 'error',
2831
'vue/require-component-is': 'error',
@@ -32,6 +35,7 @@ module.exports = {
3235
'vue/require-valid-default-prop': 'error',
3336
'vue/return-in-computed-property': 'error',
3437
'vue/use-v-on-exact': 'error',
38+
'vue/valid-next-tick': 'error',
3539
'vue/valid-template-root': 'error',
3640
'vue/valid-v-bind-sync': 'error',
3741
'vue/valid-v-bind': 'error',

0 commit comments

Comments
 (0)