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

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

Open Pentadome opened this issue 1 year ago • 1 comments

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.

Pentadome avatar Sep 04 '24 12:09 Pentadome

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

FloEdelmann avatar Sep 04 '24 12:09 FloEdelmann