Skip to content

Available Rules

Enforce all the rules in this category with:

js
export default [
  ...eslintPluginVueScopedCSS.configs['flat/recommended'],
]

or

json
{
  "extends": ["plugin:vue-scoped-css/vue3-recommended"]
}
Rule IDDescription
vue-scoped-css/enforce-style-typeenforce the <style> tags to be plain or have the scoped or module attribute
vue-scoped-css/no-deprecated-deep-combinatordisallow using deprecated deep combinators🔧
vue-scoped-css/no-parent-of-v-globaldisallow parent selector for ::v-global pseudo-element
vue-scoped-css/no-parsing-errordisallow parsing errors in <style>
vue-scoped-css/no-unused-keyframesdisallow @keyframes which don't use in Scoped CSS
vue-scoped-css/no-unused-selectordisallow selectors defined in Scoped CSS that don't use in <template>
vue-scoped-css/require-v-deep-argumentrequire selector argument to be passed to ::v-deep()🔧
vue-scoped-css/require-v-global-argumentrequire selector argument to be passed to ::v-global()
vue-scoped-css/require-v-slotted-argumentrequire selector argument to be passed to ::v-slotted()

Enforce all the rules in this category with:

js
export default [
  ...eslintPluginVueScopedCSS.configs['flat/vue2-recommended'],
]

or

json
{
  "extends": ["plugin:vue-scoped-css/recommended"]
}
Rule IDDescription
vue-scoped-css/enforce-style-typeenforce the <style> tags to be plain or have the scoped or module attribute
vue-scoped-css/no-parsing-errordisallow parsing errors in <style>
vue-scoped-css/no-unused-keyframesdisallow @keyframes which don't use in Scoped CSS
vue-scoped-css/no-unused-selectordisallow selectors defined in Scoped CSS that don't use in <template>

Uncategorized

No preset enables the rules in this category. Please enable each rule if you want.

For example:

json
{
  "rules": {
    "vue-scoped-css/no-deprecated-v-enter-v-leave-class": "error"
  }
}
Rule IDDescription
vue-scoped-css/no-deprecated-v-enter-v-leave-classdisallow v-enter and v-leave classes.
vue-scoped-css/require-selector-used-insidedisallow selectors defined that is not used inside <template>
vue-scoped-css/v-deep-pseudo-styleenforce :deep()/::v-deep() style🔧
vue-scoped-css/v-global-pseudo-styleenforce :global()/::v-global() style🔧
vue-scoped-css/v-slotted-pseudo-styleenforce :slotted()/::v-slotted() style🔧

Deprecated

  • ⚠️ We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules.
  • 😇 We don't fix bugs which are in deprecated rules since we don't have enough resources.
Rule IDReplaced by
vue-scoped-css/require-scopedvue-scoped-css/enforce-style-type