-
Notifications
You must be signed in to change notification settings - Fork 68
-
Notifications
You must be signed in to change notification settings - Fork 68
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
vue/no-unused-components incorrectly reporting #58
Comments
Hi,
You don’t need to register component, only Vue.use
Thanks
…On Sep 13, 2018, 10:53 PM +0700, Tamási Benjamin ***@***.***>, wrote:
I use the following component: https://github.com/crowdbotics/v-img
I have this:
<template>
<img v-img src="">
</template>
import VueImg from 'v-img';
...
components: {
...
VueImg,
},
When I run eslint I get the following error:
error The "VueImg" component has been registered but not used vue/no-unused-components
I'm guessing this is probably because the component is not instantiated directly, but rather just attached to the <img> tag.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@fahrenq sorry if its just my misunderstanding, but isn't https://stackoverflow.com/questions/48066237/how-to-use-a-vue-js-plugin-inside-a-custom-component |
v-img is not a component but a directive. Sorry but I didn't ever thought
of registering it for only one component.
Now module only exports object that can be used with Vue.use()
…On Thu, 13 Sep 2018, 23:47 Tamási Benjamin, ***@***.***> wrote:
@fahrenq <https://github.com/fahrenq> sorry if its just my
misunderstanding, but isn't Vue.use for registering components globally?
I only wish to use v-img on a single component, not globally.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKLK7OIZFnDIsjJZ-vosdbK1pyB_XbXsks5uaowUgaJpZM4Wnjew>
.
|
Oh, my bad :') I only just realized I submitted the issue to v-img instead of https://github.com/vuejs/eslint-plugin-vue . Its been a long day :) |
I've reported the issue here: vuejs/eslint-plugin-vue#571 |
I use the following component: https://github.com/crowdbotics/v-img
I have this:
When I run
eslint
I get the following error:error The "VueImg" component has been registered but not used vue/no-unused-components
I'm guessing this is probably because the component is not instantiated directly, but rather just attached to the
<img>
tag.The text was updated successfully, but these errors were encountered: