Skip to content

Commit

Permalink
chore: fix no-required-prop-with-default doc (#2002)
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Oct 5, 2022
1 parent f7960c8 commit 8b64576
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/rules/no-required-prop-with-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If a prop is declared with a default value, whether it is required or not, we ca
So, a required prop with a default value is essentially the same as an optional prop.
This rule enforces all props with default values to be optional.

<eslint-code-block fix :rules="{'vue/no-required-prop-with-default': ['error', { autoFix: true }]}">
<eslint-code-block fix :rules="{'vue/no-required-prop-with-default': ['error', { autofix: true }]}">

```vue
<script setup lang="ts">
Expand Down Expand Up @@ -48,7 +48,7 @@ This rule enforces all props with default values to be optional.

</eslint-code-block>

<eslint-code-block fix :rules="{'vue/no-required-prop-with-default': ['error', { autoFix: true }]}">
<eslint-code-block fix :rules="{'vue/no-required-prop-with-default': ['error', { autofix: true }]}">

```vue
<script>
Expand All @@ -60,12 +60,13 @@ This rule enforces all props with default values to be optional.
default: 'Hello'
}
}
}
</script>
```

</eslint-code-block>

<eslint-code-block fix :rules="{'vue/no-required-prop-with-default': ['error', { autoFix: true }]}">
<eslint-code-block fix :rules="{'vue/no-required-prop-with-default': ['error', { autofix: true }]}">

```vue
<script>
Expand Down

0 comments on commit 8b64576

Please sign in to comment.