noDuplicateSelectorsKeyframeBlock
¥Summary
-
规则生效日期:
v1.8.0¥Rule available since:
v1.8.0 -
诊断类别:
lint/suspicious/noDuplicateSelectorsKeyframeBlock¥Diagnostic Category:
lint/suspicious/noDuplicateSelectorsKeyframeBlock -
此规则为推荐规则,默认启用。
¥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": { "noDuplicateSelectorsKeyframeBlock": "error" } } }}¥Description
禁止关键帧块中的重复选择器。
¥Disallow duplicate selectors within keyframe blocks.
¥Examples
¥Invalid
@keyframes foo { from {} from {} }code-block.css:1:26 lint/suspicious/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ The duplicate keyframe selector is overwritten by later one.
> 1 │ @keyframes foo { from {} from {} }
│ ^^^^
2 │
ℹ Consider using a different percentage value or keyword to avoid duplication
@keyframes foo { from {} FROM {} }code-block.css:1:26 lint/suspicious/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ The duplicate keyframe selector is overwritten by later one.
> 1 │ @keyframes foo { from {} FROM {} }
│ ^^^^
2 │
ℹ Consider using a different percentage value or keyword to avoid duplication
@keyframes foo { 0% {} 0% {} }code-block.css:1:24 lint/suspicious/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ The duplicate keyframe selector is overwritten by later one.
> 1 │ @keyframes foo { 0% {} 0% {} }
│ ^^
2 │
ℹ Consider using a different percentage value or keyword to avoid duplication
¥Valid
@keyframes foo { 0% {} 100% {} }@keyframes foo { from {} to {} }¥Related links
Biome v2.1 中文网 - 粤ICP备13048890号