diff --git a/docs/rules/index.md b/docs/rules/index.md index e718603f8..10580754a 100644 --- a/docs/rules/index.md +++ b/docs/rules/index.md @@ -45,7 +45,7 @@ Rules in this category are enabled for all presets provided by eslint-plugin-vue | [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-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: | @@ -263,7 +263,7 @@ For example: | [vue/padding-line-between-blocks](./padding-line-between-blocks.md) | require or disallow padding lines between blocks | :wrench: | :lipstick: | | [vue/padding-line-between-tags](./padding-line-between-tags.md) | require or disallow newlines between sibling tags in template | :wrench: | :lipstick: | | [vue/padding-lines-in-component-definition](./padding-lines-in-component-definition.md) | require or disallow padding lines in component definition | :wrench: | :lipstick: | -| [vue/prefer-define-options](./prefer-define-options.md) | enforce use of `defineOptions` instead of default export. | :wrench: | :hammer: | +| [vue/prefer-define-options](./prefer-define-options.md) | enforce use of `defineOptions` instead of default export | :wrench: | :hammer: | | [vue/prefer-prop-type-boolean-first](./prefer-prop-type-boolean-first.md) | enforce `Boolean` comes first in component prop types | :bulb: | :warning: | | [vue/prefer-separate-static-class](./prefer-separate-static-class.md) | require static class names in template to be in a separate `class` attribute | :wrench: | :hammer: | | [vue/prefer-true-attribute-shorthand](./prefer-true-attribute-shorthand.md) | require shorthand form attribute when `v-bind` value is `true` | :bulb: | :hammer: | diff --git a/docs/rules/no-computed-properties-in-data.md b/docs/rules/no-computed-properties-in-data.md index 35bf62f1d..26c49cbbc 100644 --- a/docs/rules/no-computed-properties-in-data.md +++ b/docs/rules/no-computed-properties-in-data.md @@ -2,13 +2,13 @@ pageClass: rule-details sidebarDepth: 0 title: vue/no-computed-properties-in-data -description: disallow accessing computed properties in `data`. +description: disallow accessing computed properties in `data` since: v7.20.0 --- # vue/no-computed-properties-in-data -> disallow accessing computed properties in `data`. +> disallow accessing computed properties in `data` - :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `*.configs["flat/essential"]`, `"plugin:vue/essential"`, `*.configs["flat/vue2-essential"]`, `"plugin:vue/vue3-strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/vue3-recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/vue2-recommended"]`. diff --git a/docs/rules/prefer-define-options.md b/docs/rules/prefer-define-options.md index b63207957..5653cb011 100644 --- a/docs/rules/prefer-define-options.md +++ b/docs/rules/prefer-define-options.md @@ -2,13 +2,13 @@ pageClass: rule-details sidebarDepth: 0 title: vue/prefer-define-options -description: enforce use of `defineOptions` instead of default export. +description: enforce use of `defineOptions` instead of default export since: v9.13.0 --- # vue/prefer-define-options -> enforce use of `defineOptions` instead of default export. +> enforce use of `defineOptions` instead of default export - :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. diff --git a/eslint.config.js b/eslint.config.js index deff4615d..5ddca6175 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -139,6 +139,10 @@ module.exports = [ 'prefer-const': 2, 'prettier/prettier': 'error', + 'eslint-plugin/require-meta-docs-description': [ + 'error', + { pattern: '^(enforce|require|disallow).*[^.]$' } + ], 'eslint-plugin/require-meta-docs-recommended': 'off', // use `categories` instead 'eslint-plugin/require-meta-fixable': [ 'error', diff --git a/lib/rules/no-computed-properties-in-data.js b/lib/rules/no-computed-properties-in-data.js index a22739473..472d45f4d 100644 --- a/lib/rules/no-computed-properties-in-data.js +++ b/lib/rules/no-computed-properties-in-data.js @@ -14,7 +14,7 @@ module.exports = { meta: { type: 'problem', docs: { - description: 'disallow accessing computed properties in `data`.', + description: 'disallow accessing computed properties in `data`', categories: ['vue3-essential', 'vue2-essential'], url: 'https://eslint.vuejs.org/rules/no-computed-properties-in-data.html' }, diff --git a/lib/rules/prefer-define-options.js b/lib/rules/prefer-define-options.js index 90c83fa9a..e5fabb0ca 100644 --- a/lib/rules/prefer-define-options.js +++ b/lib/rules/prefer-define-options.js @@ -10,7 +10,7 @@ module.exports = { meta: { type: 'suggestion', docs: { - description: 'enforce use of `defineOptions` instead of default export.', + description: 'enforce use of `defineOptions` instead of default export', categories: undefined, url: 'https://eslint.vuejs.org/rules/prefer-define-options.html' },