Skip to content

Commit

Permalink
support script setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Oct 5, 2021
1 parent 0bcece9 commit 9d953de
Show file tree
Hide file tree
Showing 6 changed files with 430 additions and 347 deletions.
23 changes: 23 additions & 0 deletions docs/rules/no-undef-properties.md
Expand Up @@ -22,6 +22,29 @@ Note that there are many false positives if you are using mixins.

<eslint-code-block :rules="{'vue/no-undef-properties': ['error']}">

```vue
<template>
<!-- ✓ GOOD -->
<div>{{ name }}: {{ count }}</div>
<!-- ✗ BAD -->
<div>{{ label }}: {{ cnt }}</div>
</template>
<script setup>
const prop = defineProps(['name', 'def'])
let count = 0
/* ✓ GOOD */
watch(() => prop.def, () => console.log('Updated!'))
/* ✗ BAD */
watch(() => prop.undef, () => console.log('Updated!'))
</script>
```

</eslint-code-block>

<eslint-code-block :rules="{'vue/no-undef-properties': ['error']}">

```vue
<template>
<!-- ✓ GOOD -->
Expand Down

0 comments on commit 9d953de

Please sign in to comment.