Skip to content

Files

Latest commit

 

History

History

no-duplicate-mixins

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

no-duplicate-mixins

Disallow duplicate mixins within a stylesheet.

@mixin font-size-default {
  font-size: 16px;
}
@mixin font-size-default {
  font-size: 18px;
}
/** ↑
 * These are duplicates */

Options

true

The following patterns are considered violations:

@mixin font-size-default {
  font-size: 16px;
}
@mixin font-size-default {
  font-size: 18px;
}
@mixin font-size-default {
  font-size: 16px;
}
@mixin font-size-sm {
  font-size: 14px;
}
@mixin font-size-default {
  font-size: 18px;
}
@mixin font-size {
  font-size: 16px;
}
@mixin font-size($var) {
  font-size: $var;
}
@mixin font-size($property, $value) {
  #{$property}: $value;
}
@mixin font-size($var) {
  font-size: $var;
}
@mixin font-size {
  color: blue;
}

.b {
  @mixin font-size {
    color: red;
  }
  @include font-size;
}

The following patterns are not considered violations:

@mixin font-size-default {
  font-size: 16px;
}
@mixin font-size-lg {
  font-size: 18px;
}