gpt4 book ai didi

css - Angualar2和Stylelint : Unexpected unknown pseudo-class selector ":host"

转载 作者:行者123 更新时间:2023-12-03 15:46:12 29 4
gpt4 key购买 nike

如何教授Stylelint Angular的选择器“:host”?

例如。 Angular2-Seed by MGechev在其生成过程“:host”中显示为错误:

src/client/app/+home/home.component.css
1:1 ‼ Unexpected unknown pseudo-class selector
":host" (selector-pseudo-class-no-unknown) [stylelint]

最佳答案

使用以下selector-pseudo-class-no-unknown规则定义:

{
"rules": {
"selector-pseudo-class-no-unknown": [ true, {
ignorePseudoClasses: ["host"],
} ]
}
}

编辑:有关新的推荐方法,请参见 https://stackoverflow.com/a/39196050/1911294

关于css - Angualar2和Stylelint : Unexpected unknown pseudo-class selector ":host",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38997310/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com