From ddb947aece65a6c13ecad80d7d659fb490da208f Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Wed, 11 Aug 2021 09:42:57 +0900 Subject: [PATCH 1/4] Change config --- docs/rules/README.md | 15 ++++++--------- docs/rules/no-deprecated-v-is.md | 1 + docs/rules/no-export-in-script-setup.md | 2 ++ docs/rules/v-on-event-hyphenation.md | 1 + docs/rules/valid-define-emits.md | 2 ++ docs/rules/valid-define-props.md | 2 ++ docs/rules/valid-v-memo.md | 2 ++ lib/configs/vue3-essential.js | 5 +++++ lib/configs/vue3-strongly-recommended.js | 1 + lib/rules/no-deprecated-v-is.js | 4 +--- lib/rules/no-export-in-script-setup.js | 4 +--- lib/rules/v-on-event-hyphenation.js | 4 +--- lib/rules/valid-define-emits.js | 4 +--- lib/rules/valid-define-props.js | 4 +--- lib/rules/valid-v-is.js | 2 -- lib/rules/valid-v-memo.js | 4 +--- tests/lib/rules/require-expose.js | 10 ---------- 17 files changed, 28 insertions(+), 39 deletions(-) diff --git a/docs/rules/README.md b/docs/rules/README.md index e17125ee8..0ac2e9525 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -55,12 +55,14 @@ Enforce all the rules in this category, as well as all higher priority rules, wi | [vue/no-deprecated-slot-attribute](./no-deprecated-slot-attribute.md) | disallow deprecated `slot` attribute (in Vue.js 2.6.0+) | :wrench: | | [vue/no-deprecated-slot-scope-attribute](./no-deprecated-slot-scope-attribute.md) | disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+) | :wrench: | | [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: | +| [vue/no-deprecated-v-is](./no-deprecated-v-is.md) | disallow deprecated `v-is` directive (in Vue.js 3.1.0+) | :wrench: | | [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+) | | | [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: | | [vue/no-deprecated-vue-config-keycodes](./no-deprecated-vue-config-keycodes.md) | disallow using deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+) | | | [vue/no-dupe-keys](./no-dupe-keys.md) | disallow duplication of field names | | | [vue/no-dupe-v-else-if](./no-dupe-v-else-if.md) | disallow duplicate conditions in `v-if` / `v-else-if` chains | | | [vue/no-duplicate-attributes](./no-duplicate-attributes.md) | disallow duplication of attributes | | +| [vue/no-export-in-script-setup](./no-export-in-script-setup.md) | disallow `export` in ` - ` - }, { filename: 'ValidComponent.vue', code: ` From 1d2af11e7c99da669c921d97e92bfaf8f0eddbf1 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Tue, 14 Sep 2021 08:58:57 +0900 Subject: [PATCH 2/4] valid-next-tick to essential --- docs/rules/README.md | 3 ++- docs/rules/valid-next-tick.md | 1 + lib/configs/essential.js | 1 + lib/configs/vue3-essential.js | 1 + lib/rules/valid-next-tick.js | 3 +-- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/rules/README.md b/docs/rules/README.md index 0ac2e9525..3a36a252f 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -90,6 +90,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi | [vue/use-v-on-exact](./use-v-on-exact.md) | enforce usage of `exact` modifier on `v-on` | | | [vue/valid-define-emits](./valid-define-emits.md) | enforce valid `defineEmits` compiler macro | | | [vue/valid-define-props](./valid-define-props.md) | enforce valid `defineProps` compiler macro | | +| [vue/valid-next-tick](./valid-next-tick.md) | enforce valid `nextTick` function calls | :wrench: | | [vue/valid-template-root](./valid-template-root.md) | enforce valid template root | | | [vue/valid-v-bind](./valid-v-bind.md) | enforce valid `v-bind` directives | | | [vue/valid-v-cloak](./valid-v-cloak.md) | enforce valid `v-cloak` directives | | @@ -203,6 +204,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi | [vue/require-valid-default-prop](./require-valid-default-prop.md) | enforce props default values to be valid | | | [vue/return-in-computed-property](./return-in-computed-property.md) | enforce that a return statement is present in computed property | | | [vue/use-v-on-exact](./use-v-on-exact.md) | enforce usage of `exact` modifier on `v-on` | | +| [vue/valid-next-tick](./valid-next-tick.md) | enforce valid `nextTick` function calls | :wrench: | | [vue/valid-template-root](./valid-template-root.md) | enforce valid template root | | | [vue/valid-v-bind-sync](./valid-v-bind-sync.md) | enforce valid `.sync` modifier on `v-bind` directives | | | [vue/valid-v-bind](./valid-v-bind.md) | enforce valid `v-bind` directives | | @@ -343,7 +345,6 @@ For example: | [vue/static-class-names-order](./static-class-names-order.md) | enforce static class names order | :wrench: | | [vue/v-for-delimiter-style](./v-for-delimiter-style.md) | enforce `v-for` directive's delimiter style | :wrench: | | [vue/v-on-function-call](./v-on-function-call.md) | enforce or forbid parentheses after method calls without arguments in `v-on` directives | :wrench: | -| [vue/valid-next-tick](./valid-next-tick.md) | enforce valid `nextTick` function calls | :wrench: | ### Extension Rules diff --git a/docs/rules/valid-next-tick.md b/docs/rules/valid-next-tick.md index 43be62caa..919e59049 100644 --- a/docs/rules/valid-next-tick.md +++ b/docs/rules/valid-next-tick.md @@ -9,6 +9,7 @@ since: v7.5.0 > enforce valid `nextTick` function calls +- :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"`. - :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. ## :book: Rule Details diff --git a/lib/configs/essential.js b/lib/configs/essential.js index dca31cd2e..50a548970 100644 --- a/lib/configs/essential.js +++ b/lib/configs/essential.js @@ -32,6 +32,7 @@ module.exports = { 'vue/require-valid-default-prop': 'error', 'vue/return-in-computed-property': 'error', 'vue/use-v-on-exact': 'error', + 'vue/valid-next-tick': 'error', 'vue/valid-template-root': 'error', 'vue/valid-v-bind-sync': 'error', 'vue/valid-v-bind': 'error', diff --git a/lib/configs/vue3-essential.js b/lib/configs/vue3-essential.js index f964270bc..f72847acf 100644 --- a/lib/configs/vue3-essential.js +++ b/lib/configs/vue3-essential.js @@ -57,6 +57,7 @@ module.exports = { 'vue/use-v-on-exact': 'error', 'vue/valid-define-emits': 'error', 'vue/valid-define-props': 'error', + 'vue/valid-next-tick': 'error', 'vue/valid-template-root': 'error', 'vue/valid-v-bind': 'error', 'vue/valid-v-cloak': 'error', diff --git a/lib/rules/valid-next-tick.js b/lib/rules/valid-next-tick.js index 52b1dbae6..59bfd554e 100644 --- a/lib/rules/valid-next-tick.js +++ b/lib/rules/valid-next-tick.js @@ -119,8 +119,7 @@ module.exports = { type: 'problem', docs: { description: 'enforce valid `nextTick` function calls', - // categories: ['vue3-essential', 'essential'], - categories: undefined, + categories: ['vue3-essential', 'essential'], url: 'https://eslint.vuejs.org/rules/valid-next-tick.html' }, fixable: 'code', From b7e4858b8477b00ecb60259a6f3cdef06654f921 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Wed, 6 Oct 2021 17:36:15 +0900 Subject: [PATCH 3/4] update --- docs/rules/README.md | 3 ++- docs/rules/no-useless-template-attributes.md | 2 ++ lib/configs/essential.js | 1 + lib/configs/vue3-essential.js | 1 + lib/rules/no-useless-template-attributes.js | 4 +--- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/rules/README.md b/docs/rules/README.md index 3a36a252f..147daea5d 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -76,6 +76,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi | [vue/no-unused-components](./no-unused-components.md) | disallow registering components that are not used inside templates | | | [vue/no-unused-vars](./no-unused-vars.md) | disallow unused variable definitions of v-for directives or scope attributes | | | [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 | | +| [vue/no-useless-template-attributes](./no-useless-template-attributes.md) | disallow useless attribute on `