跳转到内容

noDuplicateAtImportRules (since v1.8.0)

Diagnostic Category: lint/nursery/noDuplicateAtImportRules

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/nursery/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/nursery/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/nursery/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;