vuejs / eslint-plugin-vue

Official ESLint plugin for Vue.js
https://eslint.vuejs.org/
MIT License
4.47k stars 667 forks source link

vue/no-unused-properties -- reports properties of type 'never' as unused. #2545

Open Pentadome opened 2 months ago

Pentadome commented 2 months ago

What did you do?

<script setup lang="ts">
interface MyTextAreaInput extends /* @vue-ignore */ TextareaHTMLAttributes {
  // prevent accidentally using min/max instead of minlength/maxlength
  min?: never; // <- 'min' of property found, but never used.
  max?: never; // <- 'max' of property found, but never used.
}
defineProps<MyTextAreaInput>()

</script>

I realize it is very unusual to use type never as a prop type. So not very important issue.

FloEdelmann commented 2 months ago

I guess that could be a small improvement (if the types are known because typescript-eslint's parser is used). PR welcome for that!