diff --git a/.stylelintrc.yml b/.stylelintrc.yml index 10f8404..bf161cb 100644 --- a/.stylelintrc.yml +++ b/.stylelintrc.yml @@ -39,7 +39,13 @@ rules: '@stylistic/function-parentheses-space-inside': never-single-line function-linear-gradient-no-nonstandard-direction: true function-calc-no-unspaced-operator: true - selector-pseudo-class-no-unknown: true + selector-pseudo-class-no-unknown: + - true + # Allow Vue's `:deep()` and `:global()` selectors + - ignorePseudoClasses: + - global + - deep + - slotted selector-pseudo-element-no-unknown: true selector-type-no-unknown: true declaration-block-no-duplicate-properties: true diff --git a/tests/stylelint/vue-sfc-selectors.pass.scss b/tests/stylelint/vue-sfc-selectors.pass.scss new file mode 100644 index 0000000..3163d57 --- /dev/null +++ b/tests/stylelint/vue-sfc-selectors.pass.scss @@ -0,0 +1,11 @@ +:deep(.foo) { + color: red; +} + +:global(.bar) { + color: blue; +} + +:slotted(.baz) { + color: green; +}