忽略-webkit-box shadow和-moz-box shadow,同时在Angular中使用stylelint
如何删除CSS属性的Stylelint规则,例如-webkit-box-shadow
和-moz-box-shadow
?因为当我运行时,它正在覆盖
命令。box-shadow
- fix
以下是我的.stylelintrc.json
文件规则列表:
{
"extends": "stylelint-config-recommended-scss",
"plugins": ["stylelint-order"],
"rules": {
"order/properties-alphabetical-order": true,
"at-rule-no-unknown": null,
"no-eol-whitespace": null,
"indentation": 2,
"number-leading-zero": null,
"at-rule-no-vendor-prefix": true,
"media-feature-name-no-vendor-prefix": true,
"property-no-vendor-prefix": true,
"selector-no-vendor-prefix": true,
"value-no-vendor-prefix": true,
"string-quotes": "single",
"at-rule-name-case": null,
"no-invalid-position-at-import-rule": null,
"scss/at-import-partial-extension": null,
"no-empty-source": null,
"no-descending-specificity": null,
"selector-pseudo-element-no-unknown": [
true,
{
"ignorePseudoElements": ["ng-deep", "input-placeholder"]
}
]
}
}
为特定css属性添加规则的任何选项
吗?任何帮助将不胜感激。
How can I remove stylelint rule for CSS properties like -webkit-box-shadow
and -moz-box-shadow
? Because it is overwriting to box-shadow
when I run --fix
command.
Below is my .stylelintrc.json
file rule list:
{
"extends": "stylelint-config-recommended-scss",
"plugins": ["stylelint-order"],
"rules": {
"order/properties-alphabetical-order": true,
"at-rule-no-unknown": null,
"no-eol-whitespace": null,
"indentation": 2,
"number-leading-zero": null,
"at-rule-no-vendor-prefix": true,
"media-feature-name-no-vendor-prefix": true,
"property-no-vendor-prefix": true,
"selector-no-vendor-prefix": true,
"value-no-vendor-prefix": true,
"string-quotes": "single",
"at-rule-name-case": null,
"no-invalid-position-at-import-rule": null,
"scss/at-import-partial-extension": null,
"no-empty-source": null,
"no-descending-specificity": null,
"selector-pseudo-element-no-unknown": [
true,
{
"ignorePseudoElements": ["ng-deep", "input-placeholder"]
}
]
}
}
Any option to add a rule for particular CSS property
? Any help will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 ignoreProperties 辅助选项 >
property-no-dendor-prefix
规则指定您不想取消修饰的属性。例如,忽略
box shadow
:You can use the
ignoreProperties
secondary option of theproperty-no-vendor-prefix
rule to specify which properties you don't want to unprefix.For example, to ignore
box-shadow
: