Strict shareable config for stylelint and SCSS.
- Extends
stylelint-standardconfig - Turns on almost all rules from
stylelint-scss - Protects you from common mistakes
- Handles how
$variablesare defined and enforces to use them - Handles how
@mixins,%placeholders, and@functionsshould be defined - Also checks
@imports, declarations,url()s, and other minor things - Enforces to use
autoprefixerby restricting vendor prefixes - Maintains consistent declarations order with
stylelint-order - Has sensible defaults
- Is opened for further extension!
npm install --save-dev stylelint-config-strict-scssThis code is considered valid (and beautiful):
$mobile: 450px;
@function em ($size, $base-font: 16px) {
@return $size * 1em / $base-font;
}
%absctract-div {
display: block;
}
div {
@extend %abstract-div;
background-image: url('https://placehold.it/400x200');
padding: em($size: 5px);
@media screen and (min-width: $mobile) {
display: none;
}
}Do you want to see it in action?
Take a look at our Vue template!
MIT.