vuejs / eslint-plugin-vue

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

Add support for `useId` to `vue/no-unsupported-features` #2584

Closed FloEdelmann closed 3 weeks ago

FloEdelmann commented 3 weeks ago

What rule do you want to change? vue/no-unsupported-features

Does this change cause the rule to produce more or fewer warnings? More

How will the change be implemented? (New option, new default behavior, etc.)? New default behavior + new ignores option.

Please provide some example code that this change will affect:

import { useId } from 'vue'

const id = useId()

What does the rule currently do for this code? Nothing.

What will the rule do after it's changed? Report an error if Vue version is < 3.5, do nothing if Vue version is >= 3.5.

Additional context See https://blog.vuejs.org/posts/vue-3-5#useid

FloEdelmann commented 3 weeks ago

Hmm, I guess we don't need it, since it has to be imported manually from vue, so it fails for older Vue versions.