跳转到内容

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.

@import 'a.css';
@import 'a.css';
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.

@import "a.css";
@import 'a.css';
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.

@import url('a.css');
@import url('a.css');
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.

@import 'a.css';
@import 'b.css';
@import url('a.css') tv;
@import url('a.css') projection;