Available Rules
Recommended for Vue.js 3.x
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 ID | Description | |
---|---|---|
vue-scoped-css/enforce-style-type | enforce the <style> tags to be plain or have the scoped or module attribute | |
vue-scoped-css/no-deprecated-deep-combinator | disallow using deprecated deep combinators | 🔧 |
vue-scoped-css/no-parent-of-v-global | disallow parent selector for ::v-global pseudo-element | |
vue-scoped-css/no-parsing-error | disallow parsing errors in <style> | |
vue-scoped-css/no-unused-keyframes | disallow @keyframes which don't use in Scoped CSS | |
vue-scoped-css/no-unused-selector | disallow selectors defined in Scoped CSS that don't use in <template> | |
vue-scoped-css/require-v-deep-argument | require selector argument to be passed to ::v-deep() | 🔧 |
vue-scoped-css/require-v-global-argument | require selector argument to be passed to ::v-global() | |
vue-scoped-css/require-v-slotted-argument | require selector argument to be passed to ::v-slotted() |
Recommended for Vue.js 2.x
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 ID | Description | |
---|---|---|
vue-scoped-css/enforce-style-type | enforce the <style> tags to be plain or have the scoped or module attribute | |
vue-scoped-css/no-parsing-error | disallow parsing errors in <style> | |
vue-scoped-css/no-unused-keyframes | disallow @keyframes which don't use in Scoped CSS | |
vue-scoped-css/no-unused-selector | disallow 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 ID | Description | |
---|---|---|
vue-scoped-css/no-deprecated-v-enter-v-leave-class | disallow v-enter and v-leave classes. | |
vue-scoped-css/require-selector-used-inside | disallow selectors defined that is not used inside <template> | |
vue-scoped-css/v-deep-pseudo-style | enforce :deep() /::v-deep() style | 🔧 |
vue-scoped-css/v-global-pseudo-style | enforce :global() /::v-global() style | 🔧 |
vue-scoped-css/v-slotted-pseudo-style | enforce :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 ID | Replaced by |
---|---|
vue-scoped-css/require-scoped | vue-scoped-css/enforce-style-type |