问题
vue3
在style中使用deep
语法时,stylelint
检查报如下错误:
1 |
75:6 × Unexpected unknown pseudo-class selector ":deep" selector-pseudo-class-no-unknown |
selector-pseudo-class-no-unknown
:禁止未知的伪类选择器
解决方法
在.stylelintrc
中添加如下配置:
1 2 3 4 5 6 7 8 9 10 |
{ "rules": { "selector-pseudo-class-no-unknown": [ true, { "ignorePseudoClasses": ["deep"] } ] } } |
官方文档
selector-pseudo-class-no-unknown
:https://stylelint.io/user-guide/rules/list/selector-pseudo-class-no-unknown