Skip to content
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

Closed
half2me opened this issue Sep 13, 2018 · 5 comments
Closed

vue/no-unused-components incorrectly reporting #58

half2me opened this issue Sep 13, 2018 · 5 comments

Comments

@half2me
Copy link

half2me commented Sep 13, 2018

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.

@fahrenq
Copy link
Contributor

fahrenq commented Sep 13, 2018 via email

@half2me
Copy link
Author

half2me commented Sep 13, 2018

@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.

https://stackoverflow.com/questions/48066237/how-to-use-a-vue-js-plugin-inside-a-custom-component

@fahrenq
Copy link
Contributor

fahrenq commented Sep 13, 2018 via email

@half2me
Copy link
Author

half2me commented Sep 13, 2018

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 :)

@half2me half2me closed this as completed Sep 13, 2018
@half2me
Copy link
Author

half2me commented Sep 13, 2018

I've reported the issue here: vuejs/eslint-plugin-vue#571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants