noDuplicateAtImportRules
诊断类别:lint/suspicious/noDuplicateAtImportRules
¥Diagnostic Category: lint/suspicious/noDuplicateAtImportRules
自从:v1.8.0
¥Since: v1.8.0
来源:
¥Sources:
禁止重复的 @import
规则。
¥Disallow duplicate @import
rules.
此规则检查 @import 规则的文件 URL 是否重复。
¥This rule checks if the file urls of the @import rules are duplicates.
此规则还检查导入的媒体查询和重复警报。
¥This rule also checks the imported media queries and alerts of duplicates.
¥Examples
¥Invalid
code-block.css:2:2 lint/suspicious/noDuplicateAtImportRules ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Each @import should be unique unless differing by media queries.
1 │ @import ‘a.css’;
> 2 │ @import ‘a.css’;
│ ^^^^^^^^^^^^^^^
3 │
ℹ Consider removing one of the duplicated imports.
code-block.css:2:2 lint/suspicious/noDuplicateAtImportRules ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Each @import should be unique unless differing by media queries.
1 │ @import “a.css”;
> 2 │ @import ‘a.css’;
│ ^^^^^^^^^^^^^^^
3 │
ℹ Consider removing one of the duplicated imports.
code-block.css:2:2 lint/suspicious/noDuplicateAtImportRules ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Each @import should be unique unless differing by media queries.
1 │ @import url(‘a.css’);
> 2 │ @import url(‘a.css’);
│ ^^^^^^^^^^^^^^^^^^^^
3 │
ℹ Consider removing one of the duplicated imports.
¥Valid
¥Related links