eslint-plugin-vue
eslint-plugin-vue copied to clipboard
Used component is falsely recognized as 'not-used'
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).