vue3使用deep语法报错:Unexpected unknown pseudo-class selector “:deep” selector-pseudo-class-no-unknown

问题

vue3在style中使用deep语法时,stylelint检查报如下错误:

selector-pseudo-class-no-unknown:禁止未知的伪类选择器

解决方法

.stylelintrc中添加如下配置:

官方文档

selector-pseudo-class-no-unknownhttps://stylelint.io/user-guide/rules/list/selector-pseudo-class-no-unknown