eslint-plugin-vue icon indicating copy to clipboard operation
eslint-plugin-vue copied to clipboard

[no-unused-properties] can't recogonize props.xxx used in template

Open tjx666 opened this issue 1 year ago • 1 comments

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

playground link

tjx666 avatar May 26 '23 10:05 tjx666

Related:

  • #2344
  • #1285

FloEdelmann avatar Dec 04 '23 17:12 FloEdelmann