From 7ba9b3ed7220a8a487ab27bc75994ca7afa4de99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=AF=E7=84=B6?= Date: Mon, 4 Mar 2024 16:42:08 +0800 Subject: [PATCH] fix: review suggestions --- docs/rules/index.md | 176 ++++++++++++++++--------------- tools/update-docs-rules-index.js | 6 +- 2 files changed, 94 insertions(+), 88 deletions(-) diff --git a/docs/rules/index.md b/docs/rules/index.md index 38560c7ac..e5ad559c1 100644 --- a/docs/rules/index.md +++ b/docs/rules/index.md @@ -35,17 +35,18 @@ Rules in this category are enabled for all presets provided by eslint-plugin-vue ## Priority A: Essential (Error Prevention) - :three: Indicates that the rule is for Vue 3 and is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"` presets. -- :two: Indicates that the rule is for Vue 2 and is included in `"plugin:vue/essential"` preset. +- :two: Indicates that the rule is for Vue 2 and is included in all of `"plugin:vue/vue2-essential"`, `"plugin:vue/vue2-strongly-recommended"` and `"plugin:vue/vue2-recommended"` presets. | Rule ID | Description | | | |:--------|:------------|:--:|:--:| -| [vue/multi-word-component-names](./multi-word-component-names.md) | require component names to be always multi-word | | :three::hammer: | -| [vue/no-arrow-functions-in-watch](./no-arrow-functions-in-watch.md) | disallow using arrow functions to define watcher | | :three::warning: | -| [vue/no-async-in-computed-properties](./no-async-in-computed-properties.md) | disallow asynchronous actions in computed properties | | :three::warning: | -| [vue/no-child-content](./no-child-content.md) | disallow element's child contents which would be overwritten by a directive like `v-html` or `v-text` | :bulb: | :three::warning: | -| [vue/no-computed-properties-in-data](./no-computed-properties-in-data.md) | disallow accessing computed properties in `data`. | | :three::warning: | +| [vue/multi-word-component-names](./multi-word-component-names.md) | require component names to be always multi-word | | :three::two::hammer: | +| [vue/no-arrow-functions-in-watch](./no-arrow-functions-in-watch.md) | disallow using arrow functions to define watcher | | :three::two::warning: | +| [vue/no-async-in-computed-properties](./no-async-in-computed-properties.md) | disallow asynchronous actions in computed properties | | :three::two::warning: | +| [vue/no-child-content](./no-child-content.md) | disallow element's child contents which would be overwritten by a directive like `v-html` or `v-text` | :bulb: | :three::two::warning: | +| [vue/no-computed-properties-in-data](./no-computed-properties-in-data.md) | disallow accessing computed properties in `data`. | | :three::two::warning: | +| [vue/no-custom-modifiers-on-v-model](./no-custom-modifiers-on-v-model.md) | disallow custom modifiers on v-model used on the component | | :two::warning: | | [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: | :three::warning: | | [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: | :three::warning: | | [vue/no-deprecated-dollar-listeners-api](./no-deprecated-dollar-listeners-api.md) | disallow using deprecated `$listeners` (in Vue.js 3.0.0+) | | :three::warning: | @@ -65,118 +66,123 @@ Rules in this category are enabled for all presets provided by eslint-plugin-vue | [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+) | | :three::warning: | | [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: | :three::warning: | | [vue/no-deprecated-vue-config-keycodes](./no-deprecated-vue-config-keycodes.md) | disallow using deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+) | | :three::warning: | -| [vue/no-dupe-keys](./no-dupe-keys.md) | disallow duplication of field names | | :three::warning: | -| [vue/no-dupe-v-else-if](./no-dupe-v-else-if.md) | disallow duplicate conditions in `v-if` / `v-else-if` chains | | :three::warning: | -| [vue/no-duplicate-attributes](./no-duplicate-attributes.md) | disallow duplication of attributes | | :three::warning: | -| [vue/no-export-in-script-setup](./no-export-in-script-setup.md) | disallow `export` in `