noDuplicateAtImportRules
Ce contenu n’est pas encore disponible dans votre langue.
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.