eslint-plugin-vue
eslint-plugin-vue copied to clipboard
[no-unused-properties] can't recogonize props.xxx used in template
Checklist
- [x] I have tried restarting my IDE and the issue persists.
- [x] I have read the FAQ and my problem is not listed.
Tell us about your environment
- ESLint version: 8.41.0
- eslint-plugin-vue version: 9.14.0
- Node version: 18.16.0
- Operating System: MacOS
Please show your full configuration:
{
"rules": {
'vue/no-unused-properties': 'error',
}
}
What did you do?
<template>
<div>
{{ props.age }}
</div>
</template>
<script lang="ts" setup>
const props = defineProps<{
// will show vue/no-unused-properties error
age: number;
}>();
</script>
What did you expect to happen?
No errors.
What actually happened?
report vue/no-unused-properties error
Repository to reproduce this issue
Related:
- #2344
- #1285