1.0.0 • Published 5 years ago

stylelint-mixin-extend-usage v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Purpose

NPM version Downloads per month

This stylelint plugin is part of a (s)css analysis. It's used by the plugin stylelint-code-quality-config. Of course you can use it for your stylelint config, too. See instructions below.

Usage

npm install stylelint-mixin-extend-usage  --save-dev

After that add this plugin to your stylelint plugins and include the rule:

"plugins": [
  "stylelint-mixin-extend-usage"
],
"rules": {
  "plugin/mixin-extend-usage": false
}

Results

This plugin reports the following findings:

  • Usage of extends with placeholder
.example {
  @extend %placeholder;
}
  • Usage of extends with no placeholder
.example {
  @extend placeholder2;
}
  • Declaration of a placeholder
%placeholder {
  color: #F00;
}
  • Declaration of a mixin
@mixin simple($w: 1px) {
  width: $w;
}
  • Usage of mixin
.example {
  @include simple($w: 5rem);
}