Skip to content

Commit b7e4858

Browse files
committed
update
1 parent 1d2af11 commit b7e4858

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

docs/rules/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
7676
| [vue/no-unused-components](./no-unused-components.md) | disallow registering components that are not used inside templates | |
7777
| [vue/no-unused-vars](./no-unused-vars.md) | disallow unused variable definitions of v-for directives or scope attributes | |
7878
| [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 | |
79+
| [vue/no-useless-template-attributes](./no-useless-template-attributes.md) | disallow useless attribute on `<template>` | |
7980
| [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 | |
8081
| [vue/no-watch-after-await](./no-watch-after-await.md) | disallow asynchronously registered `watch` | |
8182
| [vue/require-component-is](./require-component-is.md) | require `v-bind:is` of `<component>` elements | |
@@ -195,6 +196,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
195196
| [vue/no-unused-components](./no-unused-components.md) | disallow registering components that are not used inside templates | |
196197
| [vue/no-unused-vars](./no-unused-vars.md) | disallow unused variable definitions of v-for directives or scope attributes | |
197198
| [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 | |
199+
| [vue/no-useless-template-attributes](./no-useless-template-attributes.md) | disallow useless attribute on `<template>` | |
198200
| [vue/no-v-for-template-key](./no-v-for-template-key.md) | disallow `key` attribute on `<template v-for>` | |
199201
| [vue/no-v-model-argument](./no-v-model-argument.md) | disallow adding an argument to `v-model` used in custom component | |
200202
| [vue/require-component-is](./require-component-is.md) | require `v-bind:is` of `<component>` elements | |
@@ -332,7 +334,6 @@ For example:
332334
| [vue/no-unused-refs](./no-unused-refs.md) | disallow unused refs | |
333335
| [vue/no-use-computed-property-like-method](./no-use-computed-property-like-method.md) | disallow use computed property like method | |
334336
| [vue/no-useless-mustaches](./no-useless-mustaches.md) | disallow unnecessary mustache interpolations | :wrench: |
335-
| [vue/no-useless-template-attributes](./no-useless-template-attributes.md) | disallow useless attribute on `<template>` | |
336337
| [vue/no-useless-v-bind](./no-useless-v-bind.md) | disallow unnecessary `v-bind` directives | :wrench: |
337338
| [vue/no-v-text](./no-v-text.md) | disallow use of v-text | |
338339
| [vue/padding-line-between-blocks](./padding-line-between-blocks.md) | require or disallow padding lines between blocks | :wrench: |

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.

lib/configs/essential.js

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module.exports = {
2323
'vue/no-unused-components': 'error',
2424
'vue/no-unused-vars': 'error',
2525
'vue/no-use-v-if-with-v-for': 'error',
26+
'vue/no-useless-template-attributes': 'error',
2627
'vue/no-v-for-template-key': 'error',
2728
'vue/no-v-model-argument': 'error',
2829
'vue/require-component-is': 'error',

lib/configs/vue3-essential.js

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ module.exports = {
4343
'vue/no-unused-components': 'error',
4444
'vue/no-unused-vars': 'error',
4545
'vue/no-use-v-if-with-v-for': 'error',
46+
'vue/no-useless-template-attributes': 'error',
4647
'vue/no-v-for-template-key-on-child': 'error',
4748
'vue/no-watch-after-await': 'error',
4849
'vue/require-component-is': 'error',

lib/rules/no-useless-template-attributes.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ module.exports = {
3232
type: 'problem',
3333
docs: {
3434
description: 'disallow useless attribute on `<template>`',
35-
// TODO Switch to `vue3-essential` and `essential` in the major version.
36-
// categories: ['vue3-essential', 'essential'],
37-
categories: undefined,
35+
categories: ['vue3-essential', 'essential'],
3836
url: 'https://eslint.vuejs.org/rules/no-useless-template-attributes.html'
3937
},
4038
fixable: null,

0 commit comments

Comments
 (0)