Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix no-required-prop-with-default doc #2002

Merged
merged 1 commit into from
Oct 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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