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

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

Closed
2 tasks done
tjx666 opened this issue May 26, 2023 · 1 comment · Fixed by #2435
Closed
2 tasks done

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

tjx666 opened this issue May 26, 2023 · 1 comment · Fixed by #2435

Comments

@tjx666
Copy link

tjx666 commented May 26, 2023

Checklist

  • I have tried restarting my IDE and the issue persists.
  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants