noShorthandPropertyOverrides
¥Summary
-
规则生效日期:
v1.8.2¥Rule available since:
v1.8.2 -
诊断类别:
lint/suspicious/noShorthandPropertyOverrides¥Diagnostic Category:
lint/suspicious/noShorthandPropertyOverrides -
此规则为推荐规则,默认启用。
¥This rule is recommended, which means is enabled by default.
-
此规则没有修复方案。
¥This rule doesn’t have a fix.
-
此规则的默认严重级别为 error。
¥The default severity of this rule is error.
-
来源:
¥Sources:
¥How to configure
{ "linter": { "rules": { "suspicious": { "noShorthandPropertyOverrides": "error" } } }}¥Description
禁止覆盖相关长写属性的简写属性。
¥Disallow shorthand properties that override related longhand properties.
有关简写属性的详细信息,请参阅 MDN web 文档。
¥For details on shorthand properties, see the MDN web docs.
¥Examples
¥Invalid
a { padding-left: 10px; padding: 20px; }code-block.css:1:25 lint/suspicious/noShorthandPropertyOverrides ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Unexpected shorthand property padding after padding-left
> 1 │ a { padding-left: 10px; padding: 20px; }
│ ^^^^^^^
2 │
¥Valid
a { padding: 10px; padding-left: 20px; }a { transition-property: opacity; } a { transition: opacity 1s linear; }¥Related links
Biome v2.1 中文网 - 粤ICP备13048890号