stylelint-mixin-extend-usage
v1.0.0
Published
A stylelint plugin to gather information about the usage of mixins and extends
Downloads
3
Maintainers
Readme
Purpose
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);
}