Skip to content

Commit 17ac982

Browse files
committed
feat: autofix in define-props-declaration: runtime syntax to type-based syntax (vuejs#2465)
documentation update
1 parent 4499597 commit 17ac982

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: docs/rules/define-props-declaration.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This rule enforces `defineProps` typing style which you should use `type-based`
1818

1919
This rule only works in setup script and `lang="ts"`.
2020

21-
<eslint-code-block :rules="{'vue/define-props-declaration': ['error']}">
21+
<eslint-code-block fix :rules="{'vue/define-props-declaration': ['error']}">
2222

2323
```vue
2424
<script setup lang="ts">
@@ -49,7 +49,7 @@ const props = defineProps({
4949

5050
### `"runtime"`
5151

52-
<eslint-code-block :rules="{'vue/define-emits-declaration': ['error', 'runtime']}">
52+
<eslint-code-block fix :rules="{'vue/define-emits-declaration': ['error', 'runtime']}">
5353

5454
```vue
5555
<script setup lang="ts">

Diff for: docs/rules/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ For example:
214214
| [vue/custom-event-name-casing](./custom-event-name-casing.md) | enforce specific casing for custom event name | | :hammer: |
215215
| [vue/define-emits-declaration](./define-emits-declaration.md) | enforce declaration style of `defineEmits` | | :hammer: |
216216
| [vue/define-macros-order](./define-macros-order.md) | enforce order of `defineEmits` and `defineProps` compiler macros | :wrench::bulb: | :lipstick: |
217-
| [vue/define-props-declaration](./define-props-declaration.md) | enforce declaration style of `defineProps` | | :hammer: |
217+
| [vue/define-props-declaration](./define-props-declaration.md) | enforce declaration style of `defineProps` | :wrench: | :hammer: |
218218
| [vue/enforce-style-attribute](./enforce-style-attribute.md) | enforce or forbid the use of the `scoped` and `module` attributes in SFC top level style tags | | :hammer: |
219219
| [vue/html-button-has-type](./html-button-has-type.md) | disallow usage of button without an explicit type attribute | | :hammer: |
220220
| [vue/html-comment-content-newline](./html-comment-content-newline.md) | enforce unified line brake in HTML comments | :wrench: | :lipstick: |

0 commit comments

Comments
 (0)