pageClass | sidebarDepth | title | description |
---|---|---|---|
rule-details |
0 |
vue-scoped-css/no-unused-keyframes |
disallow `@keyframes` which don't use in Scoped CSS |
disallow
@keyframes
which don't use in Scoped CSS
- βοΈ This rule is included in all of
"plugin:vue-scoped-css/all"
,"plugin:vue-scoped-css/recommended"
and"plugin:vue-scoped-css/vue3-recommended"
.
This rule reports @keyframes
is not used in Scoped CSS.
<style scoped>
.item {
animation-name: slidein;
}
/* β BAD */
@keyframes unused-animation {
}
/* β GOOD */
@keyframes slidein {
}
</style>
{
"vue-scoped-css/no-unused-keyframes": ["error", {
"checkUnscoped": false
}]
}
checkUnscoped
... The rule only checks<style scoped>
by default, but if set totrue
it will also check<style>
without the scoped attribute. If you set it totrue
, be very careful that the warned CSS may actually be used outside the.vue
file.