noDuplicateAtImportRules
此内容尚不支持你的语言。
Diagnostic Category: lint/suspicious/noDuplicateAtImportRules
Since: v1.8.0
Sources:
Disallow duplicate @import
rules.
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
Section titled ExamplesInvalid
Section titled Invalidcode-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.