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
In the SFC-styled component definition, one can import a component, and then register it in the components section, while not using it in the template. See the example below:
<template>
<div>I'm not using any component.</div>
</template>
<script>
import SomeComponent from './somewhere'
export default {
components: {
SomeComponent // Should be treated as unused component
}
}
</script>
In this case, the imported component is considered as used variable according to standard eslint rules, since the components section contains its reference. If there is a rule in eslint-plugin-vue that could prevent this happening, it would be great.
Cheers,
Zihan
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hello there,
In the SFC-styled component definition, one can import a component, and then register it in the
components
section, while not using it in the template. See the example below:In this case, the imported component is considered as used variable according to standard eslint rules, since the
components
section contains its reference. If there is a rule ineslint-plugin-vue
that could prevent this happening, it would be great.Cheers,
Zihan
The text was updated successfully, but these errors were encountered: