Skip to content

Fix doc of vue/no-potential-component-option-typo rule #1308

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

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/rules/no-potential-component-option-typo.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default {

</eslint-code-block>

> we use editdistance to compare two string similarity, threshold is an option to control upper bound of editdistance to report
> we use edit distance to compare two string similarity, threshold is an option to control upper bound of edit distance to report

**Here is the another example about config option `threshold`**

Expand All @@ -75,15 +75,15 @@ export default {
props: {

},
/* ✓ GOOD, due to threshold is 5 */
method: {
/* ✗ BAD, due to threshold is 5 */
mehtod: {

},
/* ✓ GOOD, due to threshold is 5 */
data: {

},
/* ✗ BAD, due to we don't choose vue-router preset or add a custom option */
/* ✓ GOOD, due to we don't choose vue-router preset or add a custom option */
beforeRouteEnteR() {

}
Expand All @@ -97,7 +97,7 @@ export default {

```json
{
"vue/no-unsed-vars": ["error", {
"vue/no-potential-component-option-typo": ["error", {
"presets": ["vue"],
"custom": [],
"threshold": 1
Expand All @@ -111,11 +111,11 @@ export default {

## :rocket: Suggestion

- We provide all the possible component option that editdistance between your vue component option and configuration options is greater than 0 and lessEqual than threshold
- We provide all the possible component option that edit distance between your vue component option and configuration options is greater than 0 and less equal than threshold

## :books: Further Reading

- [Edit_distance](https://en.wikipedia.org/wiki/Edit_distance)
- [Edit distance](https://en.wikipedia.org/wiki/Edit_distance)

## :mag: Implementation

Expand Down