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

Used component is falsely recognized as 'not-used'

Open trajche18 opened this issue 6 years ago • 0 comments

Tell us about your environment

  • ESLint version: 5.15.1
  • eslint-plugin-vue version: 5.2.2
  • Node version: 10.12.29

What did you do?

I imported the vue component from the right path.

import **VCheckbox** from '@/components/common/VCheckbox'

export default {
  components: {
    VCheckbox
  },

Afterwards, I actually used the component, as seen below:

  .add('VCheckbox', () => ({
    components: { VCheckbox },
    template:
      '<v-stats-card :items="items" label="I agree to the Terms and Conditions" ' +
      ':rules="[v => !!v || \'You must agree with the terms and conditions in order to continue.\']" ' +
      'arialabel="You must agree with the terms." ' +
      '@click="onClicked(\'checkbox clicked\')" />',
    methods
  }))

What actually happened?

I get the following error-msg: ESLint: The VCheckbox component has been registered but not used (vue/no-unused-components).

trajche18 avatar Mar 07 '19 11:03 trajche18