You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you expect to happen?
In the code above, the 'msg' prop will trigger a vue/no-unused-properties error, stating: 'msg' property found but never used. However, it is indeed being used.
What actually happened?
This bug occurs because the file does not import toRefs. Instead, it is imported by unplugin-auto-import, a global tool that eliminates the need for users to import certain common libraries. If you uncomment the toRefs import in this file, the ESLint error will disappear, and everything will be fine.
There are other rules that also have issues with 'unplugin-auto-import'. For instance, no-ref-object-reactivity-loss won't report an error unless 'toRefs' is imported.
The text was updated successfully, but these errors were encountered:
Nathan7139
changed the title
vue/no-unused-properties false negative with unplugin-auto-importvue/no-unused-properties false alarm with unplugin-auto-importNov 21, 2023
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
In the code above, the 'msg' prop will trigger a
vue/no-unused-properties
error, stating:'msg' property found but never used.
However, it is indeed being used.What actually happened?
This bug occurs because the file does not import
toRefs
. Instead, it is imported byunplugin-auto-import
, a global tool that eliminates the need for users to import certain common libraries. If you uncomment thetoRefs
import in this file, the ESLint error will disappear, and everything will be fine.There are other rules that also have issues with 'unplugin-auto-import'. For instance, no-ref-object-reactivity-loss won't report an error unless 'toRefs' is imported.
Repository to reproduce this issue
https://github.com/Nathan7139/vue-unused-props-debug
The text was updated successfully, but these errors were encountered: