Skip to content

Commit 3487873

Browse files
committed
chore: run update
1 parent cb02d04 commit 3487873

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/rules/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ For example:
274274
| [vue/prefer-prop-type-boolean-first] | enforce `Boolean` comes first in component prop types | :bulb: | :warning: |
275275
| [vue/prefer-separate-static-class] | require static class names in template to be in a separate `class` attribute | :wrench: | :hammer: |
276276
| [vue/prefer-true-attribute-shorthand] | require shorthand form attribute when `v-bind` value is `true` | :bulb: | :hammer: |
277-
| [vue/prefer-use-template-ref] | require using `useTemplateRef` instead of `ref`/`shallowRef` for template refs | | :hammer: |
277+
| [vue/prefer-use-template-ref] | require using `useTemplateRef` instead of `ref`/`shallowRef` for template refs | :wrench: | :hammer: |
278278
| [vue/require-default-export] | require components to be the default export | | :warning: |
279279
| [vue/require-direct-export] | require the component to be directly exported | | :hammer: |
280280
| [vue/require-emit-validator] | require type definitions in emits | :bulb: | :hammer: |

docs/rules/prefer-use-template-ref.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@ since: v9.31.0
1010

1111
> require using `useTemplateRef` instead of `ref`/`shallowRef` for template refs
1212
13+
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.
14+
1315
## :book: Rule Details
1416

1517
Vue 3.5 introduced a new way of obtaining template refs via
1618
the [`useTemplateRef()`](https://vuejs.org/guide/essentials/template-refs.html#accessing-the-refs) API.
1719

1820
This rule enforces using the new `useTemplateRef` function instead of `ref`/`shallowRef` for template refs.
1921

20-
<eslint-code-block :rules="{'vue/prefer-use-template-ref': ['error']}">
22+
<eslint-code-block fix :rules="{'vue/prefer-use-template-ref': ['error']}">
2123

2224
```vue
2325
<template>
@@ -45,7 +47,7 @@ This rule enforces using the new `useTemplateRef` function instead of `ref`/`sha
4547
This rule skips `ref` template function refs as these should be used to allow custom implementation of storing `ref`. If you prefer
4648
`useTemplateRef`, you have to change the value of the template `ref` to a string.
4749

48-
<eslint-code-block :rules="{'vue/prefer-use-template-ref': ['error']}">
50+
<eslint-code-block fix :rules="{'vue/prefer-use-template-ref': ['error']}">
4951

5052
```vue
5153
<template>

0 commit comments

Comments
 (0)